Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rules updates #8

Merged
merged 5 commits into from
Feb 7, 2020
Merged

Rules updates #8

merged 5 commits into from
Feb 7, 2020

Conversation

blakek
Copy link
Contributor

@blakek blakek commented Jan 20, 2020

Added

Changed

  • ✨ Uses eslint-plugin-prettier to stop conflicts between ESLint and Prettier.
  • The camelcase rule is now more lenient. This should result in fewer errors when working with, for example, HTTP headers or external libraries that use snake case.

Removed

  • Disabled the sort-keys rule. This was removed to reduce time spent doing stylistic tweaks.

Resolves #5

Modifies the [camelcase](https://eslint.org/docs/rules/camelcase) rule to be more lenient.

Removes the [sort-keys](https://eslint.org/docs/rules/sort-keys) rule. To try and reduce time spent doing stylistic tweaks, this has been removed. If it's valuable to specific projects, the project lead can add it to the project.

Adds the following rules:

- [array-callback-return](https://eslint.org/docs/rules/array-callback-return) - Enforces return statements in callbacks of array’s methods
- [no-extra-label](https://eslint.org/docs/rules/no-extra-label) - Disallow unnecessary Labels (catches incorrectly formed objects)
- [no-native-reassign](https://eslint.org/docs/rules/no-native-reassign) - Sets many (browser) globals as read-only
- [no-restricted-syntax](https://eslint.org/docs/rules/no-restricted-syntax) - ['warn', 'WithStatement'] Disallows `with`
- [no-restricted-globals](https://eslint.org/docs/rules/no-restricted-globals) - Disallow some globals (e.g. `'no-restricted-globals': ['error'].concat(restrictedGlobals),`). See https://github.com/facebook/create-react-app/blob/next/packages/confusing-browser-globals/index.js
- [no-unused-labels](https://eslint.org/docs/rules/no-unused-labels) - Disallow unnecessary Labels (catches incorrectly formed objects)
- [no-useless-concat](https://eslint.org/docs/rules/no-useless-concat) - Disallows concatenation of short (e.g. non-multiline) string literals
- [radix](https://eslint.org/docs/rules/radix) - ensures radix is specified (when using `as-needed`)
- [promise/no-new-statics](https://github.com/xjamundx/eslint-plugin-promise/blob/master/docs/rules/no-new-statics.md) - avoids TypeErrors from calling `new` on a Promise static method
"eslint-plugin-node": "4 || 5",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1"
"confusing-browser-globals": "^1.0.9",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol wat

@blakek blakek merged commit 4b495e0 into master Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposed new additions
3 participants