Giter VIP home page Giter VIP logo

eslint-config-wetransfer's Introduction

npm-version CircleCI semantic-release

WeTransfer ESLint Config

This package provides WeTransfer's base .eslintrc as an extensible shared config. We also provide some React rules as a separate configuration. It is eslint@4+-compatible and maintained by the friendly folks at WeTransfer.

Installation

  1. Install this config package and ESLint: npm install --save-dev eslint @wetransfer/eslint-config-wetransfer.
  2. Add "extends": "@wetransfer/wetransfer" to your .eslintrc.
  3. Add "extends": "@wetransfer/wetransfer/react" to your .eslintrc if you want to make use of our React specific rules. In that case, please install eslint-plugin-react as well:
  • npm install --save-dev eslint-plugin-react

Which rules do we define?

Please take a look to the source code of index.js, which lists every ESLint rule provided by this configuration.

Development

After checking out the repo, run yarn to install all dependencies. To run all tests:

$ npm test

Release process

First, make sure that you have a NPM account at https://www.npmjs.com/, and you are part of the WeTransfer developer's team. Use npm login to store the credentials on the client aka, your computer. Check that your authentication token for registry.npmjs.org is part of your ~/.npmrc file.

We use semantic-release to manage release process. Please run npm run release:dry to check relevant changes and possible new versions. If you are happy with it, run npm run release, it should do the following:

  • Verify authentication for registry
  • Verify GitHub authentication
  • Find latest release and associated git tag
  • Find last commits since last release
  • Generate release notes
  • Create Git tag
  • Prepare the package and release it ๐Ÿ“ฆ

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/WeTransfer/eslint-config-wetransfer. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The package is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting with WeTransfer project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

eslint-config-wetransfer's People

Contributors

arkaitzgarro avatar danielle12hoven avatar dependabot[bot] avatar maxvw avatar renovate[bot] avatar seelts avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eslint-config-wetransfer's Issues

Exclude semantic-release from renovate

Newer versions of semantic-release break our release process, which works just fine. Let's remove this package from renovate, so we don't get annoyed by updates.

Open-source checklist

  • Add a README.md file containing all the basic information about your project.
  • Add a CONTRIBUTING.md file containing all the necessary information for other developers
  • Add PR GitHub template
  • Add a .gitignore file containing everything you do not want versioned
  • Licensing. (#1 )
  • Document your project in the best possible way.
  • CHANGELOG.md
  • Use badges to indicate the status of your project.
  • Add specs
  • CI!
  • Submit to NPM
  • Publish Repo
  • Add a code of conduct. (https://github.com/WeTransfer/wt-tech-docs/pull/50)

@tob @arkaitzgarro @danielle12hoven @manpreetssethi @renesijnke Please add/edit

Setup renovate app

Setup Renovate to keep our dependencies up to date.

We should discuss which semanticPrefix do we want to set, since in that concrete scenario, the output will not change, regardless the dependencies.

Collect other rulesets in this repo

Up for discussion:

Eslint enables you to export different sets of rules within one eslint plugin. Github does this for example: https://github.com/github/eslint-plugin-github.

I like to do this as well, cause it enables us to only import the rules we need per project and make it future-proof. Take in mind this module become a plugin instead of a shareable config.

My proposal is distinct normal JS and React rules to start with, so they can be imported as follows:

// .eslintrc.json
{
  "extends": [
    "plugin:wetransfer/recommended",
    "plugin:wetransfer/react"
  ]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.