Giter Club home page Giter Club logo

eslint-config's People

Contributors

calebissharp avatar chadfawcett avatar chrisfosterelli avatar dependabot-preview[bot] avatar dependabot[bot] avatar jonotron avatar

Watchers

 avatar  avatar  avatar  avatar

eslint-config's Issues

CRA pins eslint which causes issues with the unpinned peer dependency

create-react-app pins the eslint version as a direct dependency which results in issues when we install a different version to satisfy the peer dependency of this package. CRA says eslint should not be installed manually, but their installation is not hoisted for use by our package scripts.

We have a couple options:

  1. make eslint a dependency of this package
  2. recommend installing the eslint version that CRA uses (not recommended by CRA and would be annoying to remember when Renovate tries to bump the version)
  3. See if CRA's eslint config satisfies our own. If it does, we don't need to add our own eslint config for CRA projects.

Rule Proposal: `prefer-const`

I propose that we use the prefer-const rule so we don't have to worry about let variables that aren't reassigned.

I think when the team started using let and const we mentioned that a good practice would be to always use const when the variable doesn't change. This wasn't formal or written down anywhere, so I think this rule will help.

Can I get a vote (πŸ‘or πŸ‘Ž) from @TwoStoryRobot/devs and @TwoStoryRobot/students?

ESLint fails with create react apps

I get the following errors after installing in a fresh CRA

/App.js
  1:1  error  Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

This comment: eslint/eslint#6203 (comment) recommends setting sourceType: module in the eslint config, but https://eslint.org/docs/user-guide/configuring#specifying-parser-options recommends using eslint-react-plugin.

Should we also be installingeslint-plugin-react as a peer dependency and including it's config in the .eslintrc.js file?

Use of single-quotes clashing with prettier

Prettier changes strings that contain single quotes to use double quotes. This conflicts with eslint which strictly only allows single quotes. This prevents pre-commit checks from being successful. This could be fixed by using the "avoidEscape" option for quotes.

conflict between prettier and eslint configs

eslint throws a bunch of indentation errors about indentations introduced by prettier.

screen shot 2018-05-18 at 3 31 53 pm

Potential fix would be to add eslint-config-prettier which turns off all rules that might conflict with Prettier.

Two add to our config specs, change the following in index.js:

- extends: ['eslint:recommended', 'plugin:jest/recommended']
+ extends: ['eslint:recommended', 'plugin:jest/recommended', 'prettier']

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.