Skip to content

Commit

Permalink
📦 eslint-config 💬 Maintenance and update dependencies (#12)
Browse files Browse the repository at this point in the history
* JSON-ify config

* Update dependencies and switch to peerDependencies

See https://eslint.org/docs/developer-guide/shareable-configs.
  • Loading branch information
alfonsomunozpomer committed Jan 10, 2020
1 parent f9195b2 commit 8a7e788
Show file tree
Hide file tree
Showing 3 changed files with 770 additions and 2,078 deletions.
51 changes: 27 additions & 24 deletions packages/eslint-config/index.js
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
}
}]
}

Loading

0 comments on commit 8a7e788

Please sign in to comment.