Commit 1f0feb48 authored by Andrew Hrdy's avatar Andrew Hrdy

Added react linting. Switched to babel parser for ES experimental features.

parent 77f06e2f
Pipeline #1924 passed with stage
in 1 minute and 45 seconds
{
"parser": "babel-eslint",
"env": {
"browser": true,
"commonjs": true,
......@@ -11,18 +12,22 @@
},
"sourceType": "module"
},
"extends": "eslint:recommended",
"plugins": [
"react"
],
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"rules": {
//Overridden from eslint:reccomended
"no-console": "off",
//Possible Errors
"for-direction": "warn",
"no-template-curly-in-string": "warn",
//Best Practices
"block-scoped-var": "error",
"no-empty-function": "error",
"no-implicit-globals": "error",
"no-invalid-this": "error",
"no-multi-spaces": "error",
"no-self-compare": "warn",
//Variables
......@@ -38,21 +43,20 @@
"comma-spacing": "warn",
"computed-property-spacing": "error",
"func-call-spacing": "error",
"implicit-arrow-linebreak": "warn",
"indent": "error",
"jsx-quotes": "error",
"key-spacing": "warn",
"keyword-spacing": "warn",
"lines-between-class-members": "warn",
"multiline-comment-style": "warn",
"no-lonely-if": "warn",
"no-multiple-empty-lines": "warn",
"no-tabs": "error",
"no-trailing-spaces": "error",
"no-whitespace-before-property": "error",
"object-curly-newline": [
"warn",
"always"
"warn", {
"ObjectExpression": {"minProperties": 1},
"ObjectPattern": "never"
}
],
"object-curly-spacing": "warn",
"object-property-newline": "warn",
......@@ -74,7 +78,6 @@
"after": true
}
],
"semi-style": "error",
"space-before-blocks": "error",
"space-before-function-paren": [
"error",
......@@ -89,7 +92,6 @@
"nonwords": false
}
],
"switch-colon-spacing": "error",
//ECMAScript 6
"arrow-parens": "warn",
"arrow-spacing": [
......@@ -109,6 +111,16 @@
"prefer-spread": "error",
"prefer-template": "warn",
"rest-spread-spacing": "error",
"template-curly-spacing": "error"
"template-curly-spacing": "error",
//Overriden from plugin:react/reccommended
"react/no-unescaped-entities": "off",
//plugin:react
"react/boolean-prop-naming": "warn",
"react/no-danger": "error",
"react/no-typos": "warn",
"react/jsx-indent": "error",
"react/jsx-pascal-case": "error",
"react/jsx-space-before-closing": "warn",
"react/jsx-wrap-multilines": "warn"
}
}
\ No newline at end of file
......@@ -3464,14 +3464,26 @@
}
},
"eslint-plugin-react": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.1.0.tgz",
"integrity": "sha1-J3cKzzn1/UnNCvQIPOWBBOs5DUw=",
"version": "7.5.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.5.1.tgz",
"integrity": "sha512-YGSjB9Qu6QbVTroUZi66pYky3DfoIPLdHQ/wmrBGyBRnwxQsBXAov9j2rpXt/55i8nyMv6IRWJv2s4d4YnduzQ==",
"dev": true,
"requires": {
"doctrine": "2.0.2",
"has": "1.0.1",
"jsx-ast-utils": "1.4.1"
"jsx-ast-utils": "2.0.1",
"prop-types": "15.6.0"
},
"dependencies": {
"jsx-ast-utils": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz",
"integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=",
"dev": true,
"requires": {
"array-includes": "3.0.3"
}
}
}
},
"espree": {
......@@ -4408,7 +4420,8 @@
},
"jsbn": {
"version": "0.1.1",
"bundled": true
"bundled": true,
"optional": true
},
"json-schema": {
"version": "0.2.3",
......@@ -10284,6 +10297,17 @@
"regenerator-runtime": "0.10.5"
}
},
"eslint-plugin-react": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.1.0.tgz",
"integrity": "sha1-J3cKzzn1/UnNCvQIPOWBBOs5DUw=",
"dev": true,
"requires": {
"doctrine": "2.0.2",
"has": "1.0.1",
"jsx-ast-utils": "1.4.1"
}
},
"fsevents": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz",
......
......@@ -28,6 +28,7 @@
"redux-thunk": "^2.2.0"
},
"devDependencies": {
"eslint-plugin-react": "^7.5.1",
"react-scripts": "1.0.10"
},
"proxy": "http://localhost:3001",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment