diff options
author | Renard | 2019-09-16 01:53:22 -0300 |
---|---|---|
committer | Renard | 2019-09-16 01:53:22 -0300 |
commit | 07c4dcb976b79fb843f13cd67fe8ac2820ad68c9 (patch) | |
tree | 8593b14e9863fb2a8d8e66ed0e6229ee3fb770c9 | |
parent | 464d949467c4c16bd396661d3880813d0cba6f3b (diff) | |
download | bai-client-07c4dcb976b79fb843f13cd67fe8ac2820ad68c9.tar.gz bai-client-07c4dcb976b79fb843f13cd67fe8ac2820ad68c9.tar.xz bai-client-07c4dcb976b79fb843f13cd67fe8ac2820ad68c9.zip |
ESLint Setup
-rw-r--r-- | .eslintrc.json | 25 | ||||
-rw-r--r-- | .prettierrc | 1 | ||||
-rw-r--r-- | package-lock.json | 67 | ||||
-rw-r--r-- | package.json | 11 |
4 files changed, 83 insertions, 21 deletions
diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..c1af961 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,25 @@ +{ + "extends": [ + "eslint:recommended", + "plugin:import/errors", + "plugin:react/recommended", + "plugin:jsx-a11y/recommended", + "prettier", + "prettier/react" + ], + "rules": { "react/prop-types": 0, "no-console": 1, "no-unused-vars": 1 }, + "plugins": [], + "parserOptions": { + "ecmaVersion": 2019, + "sourceType": "module", + "ecmaFeatures": { + "jsx": true + } + }, + "env": { + "es6": true, + "browser": true, + "node": true + }, + "settings": { "react": { "version": "detect" } } +} diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/.prettierrc @@ -0,0 +1 @@ +{}
\ No newline at end of file diff --git a/package-lock.json b/package-lock.json index bf23a17..0e5c325 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2478,27 +2478,17 @@ } }, "babel-eslint": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.0.2.tgz", - "integrity": "sha512-UdsurWPtgiPgpJ06ryUnuaSXC2s0WoSZnQmEpbAH65XZSdwowgN5MvyP7e88nW07FYXv72erVtpBkxyDVKhH1Q==", + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.0.3.tgz", + "integrity": "sha512-z3U7eMY6r/3f3/JB9mTsLjyxrv0Yb1zb8PCWCLpguxfCzBIZUwy23R1t/XKewP+8mEN2Ck8Dtr4q20z6ce6SoA==", + "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "@babel/parser": "^7.0.0", "@babel/traverse": "^7.0.0", "@babel/types": "^7.0.0", - "eslint-scope": "3.7.1", - "eslint-visitor-keys": "^1.0.0" - }, - "dependencies": { - "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - } + "eslint-visitor-keys": "^1.0.0", + "resolve": "^1.12.0" } }, "babel-extract-comments": { @@ -5683,9 +5673,9 @@ } }, "eslint": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.3.0.tgz", - "integrity": "sha512-ZvZTKaqDue+N8Y9g0kp6UPZtS4FSY3qARxBs7p4f0H0iof381XHduqVerFWtK8DPtKmemqbqCFENWSQgPR/Gow==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.4.0.tgz", + "integrity": "sha512-WTVEzK3lSFoXUovDHEbkJqCVPEPwbhCq4trDktNI6ygs7aO41d4cDT0JFAT5MivzZeVLWlg7vHL+bgrQv/t3vA==", "requires": { "@babel/code-frame": "^7.0.0", "ajv": "^6.10.0", @@ -5751,6 +5741,15 @@ } } }, + "eslint-config-prettier": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.3.0.tgz", + "integrity": "sha512-EWaGjlDAZRzVFveh2Jsglcere2KK5CJBhkNSa1xs3KfMUGdRiT7lG089eqPdvlzWHpAqaekubOsOMu8W8Yk71A==", + "dev": true, + "requires": { + "get-stdin": "^6.0.0" + } + }, "eslint-config-react-app": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-5.0.1.tgz", @@ -7072,6 +7071,12 @@ "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=", "dev": true }, + "get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "dev": true + }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -14409,6 +14414,30 @@ "webpack-dev-server": "3.2.1", "webpack-manifest-plugin": "2.0.4", "workbox-webpack-plugin": "4.3.1" + }, + "dependencies": { + "babel-eslint": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.0.2.tgz", + "integrity": "sha512-UdsurWPtgiPgpJ06ryUnuaSXC2s0WoSZnQmEpbAH65XZSdwowgN5MvyP7e88nW07FYXv72erVtpBkxyDVKhH1Q==", + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.0.0", + "@babel/traverse": "^7.0.0", + "@babel/types": "^7.0.0", + "eslint-scope": "3.7.1", + "eslint-visitor-keys": "^1.0.0" + } + }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + } } }, "react-time-ago": { diff --git a/package.json b/package.json index a652b65..e12cbb2 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "scripts": { "dev": "parcel src/index.html", "build": "parcel build src/index.html", - "format": "prettier \"src/**/*.{js,css,html}\" --write" + "format": "prettier \"src/**/*.{js,css,html}\" --write", + "lint": "eslint \"src/**/*.{js,jsx} --quiet" }, "eslintConfig": { "extends": "react-app" @@ -39,7 +40,13 @@ ] }, "devDependencies": { + "babel-eslint": "^10.0.3", + "eslint": "^6.4.0", + "eslint-config-prettier": "^6.3.0", + "eslint-plugin-import": "^2.18.2", + "eslint-plugin-jsx-a11y": "^6.2.3", + "eslint-plugin-react": "^7.14.3", "parcel-bundler": "^1.12.3", "prettier": "^1.18.2" } -}
\ No newline at end of file +} |