-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📦 eslint-config 💬 Maintenance and update dependencies (#12)
* JSON-ify config * Update dependencies and switch to peerDependencies See https://eslint.org/docs/developer-guide/shareable-configs.
- Loading branch information
1 parent
f9195b2
commit 8a7e788
Showing
3 changed files
with
770 additions
and
2,078 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,40 @@ | ||
module.exports = { | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:react/recommended' | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended" | ||
], | ||
|
||
parserOptions: { | ||
ecmaVersion: 2018, | ||
sourceType: 'module' | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "module" | ||
}, | ||
|
||
env: { | ||
'browser': true, | ||
'jest': true, | ||
'es6': true | ||
"env": { | ||
"browser": true, | ||
"jest": true, | ||
"es6": true | ||
}, | ||
|
||
settings: { | ||
'import/resolver': 'webpack' | ||
"settings": { | ||
"import/resolver": "webpack", | ||
"react": { | ||
"version": "detect" | ||
} | ||
}, | ||
|
||
rules: { | ||
'no-var': 'error', // Enforce using const and let, rather than var | ||
semi: ['warn', 'never'], // Disallow semicolons | ||
quotes: ['warn', 'backtick'], // Enforce using `` for strings | ||
eqeqeq: ['error', 'always'], // Enforce using === and !== | ||
indent: ['error', 2], // Enforce indentation using 2 spaces | ||
'no-console': ['warn', { allow: ['warn', 'error']}] // Allow console.warn and console.error statements | ||
"rules": { | ||
"no-var": "error", // Enforce using const and let, rather than var | ||
"semi": ["warn", "never"], // Disallow semicolons | ||
"quotes": ["warn", "backtick"], // Enforce using `` for strings | ||
"eqeqeq": ["error", "always"], // Enforce using === and !== | ||
"indent": ["error", 2], // Enforce indentation using 2 spaces | ||
"no-console": ["warn", { "allow": ["warn", "error"] }] // Allow console.warn and console.error statements | ||
}, | ||
overrides: [{ | ||
files: [ '*.test.js' ], | ||
rules: { | ||
'react/react-in-jsx-scope': 0 | ||
|
||
"overrides": [{ | ||
"files": ["*.test.js"], | ||
"rules": { | ||
"react/react-in-jsx-scope": 0 | ||
} | ||
}] | ||
} | ||
|
Oops, something went wrong.