Configured eslint

This commit is contained in:
Mustafa Buyukcelebi 2019-05-03 14:14:21 +03:00
parent 624fdee1a4
commit 4ce950fab5
4 changed files with 56 additions and 4 deletions

View File

@ -1,10 +1,11 @@
{ {
"extends": "airbnb", "extends": ["airbnb", "prettier", "prettier/react"],
"parser": "babel-eslint", "parser": "babel-eslint",
"env": { "env": {
"browser": true "browser": true,
"jest": true
}, },
"plugins": ["react"], "plugins": ["react", "jsx-a11y", "import", "prettier"],
"rules": { "rules": {
"react/jsx-filename-extension": [ "react/jsx-filename-extension": [
2, 2,
@ -23,6 +24,14 @@
"react/prop-types": 0, "react/prop-types": 0,
"import/no-named-default": "off", "import/no-named-default": "off",
"no-param-reassign": "off", "no-param-reassign": "off",
"no-case-declarations": "off" "no-case-declarations": "off",
"prettier/prettier": [
"error",
{
"trailingComma": "all",
"singleQuote": true,
"printWidth": 100
}
]
} }
} }

View File

@ -0,0 +1,6 @@
{
"editor.formatOnSave": true,
"prettier.printWidth": 100,
"prettier.singleQuote": true,
"prettier.trailingComma": "all"
}

View File

@ -79,10 +79,12 @@
"eslint-config-airbnb": "^17.1.0", "eslint-config-airbnb": "^17.1.0",
"eslint-plugin-import": "^2.14.0", "eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.1", "eslint-plugin-jsx-a11y": "^6.1.1",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "^7.11.1", "eslint-plugin-react": "^7.11.1",
"jest": "23.6.0", "jest": "23.6.0",
"lint-staged": "^7.2.0", "lint-staged": "^7.2.0",
"metro-react-native-babel-preset": "0.47.0", "metro-react-native-babel-preset": "0.47.0",
"pre-commit": "^1.2.2",
"prettier": "^1.14.3", "prettier": "^1.14.3",
"prettier-eslint": "^8.8.2", "prettier-eslint": "^8.8.2",
"react-test-renderer": "16.6.0-alpha.8af6728", "react-test-renderer": "16.6.0-alpha.8af6728",

View File

@ -3109,6 +3109,13 @@ eslint-plugin-jsx-a11y@^6.1.1:
has "^1.0.3" has "^1.0.3"
jsx-ast-utils "^2.0.1" jsx-ast-utils "^2.0.1"
eslint-plugin-prettier@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.0.1.tgz#19d521e3981f69dd6d14f64aec8c6a6ac6eb0b0d"
integrity sha512-/PMttrarPAY78PLvV3xfWibMOdMDl57hmlQ2XqFeA37wd+CJ7WSxV7txqjVPHi/AAFKd2lX0ZqfsOc/i5yFCSQ==
dependencies:
prettier-linter-helpers "^1.0.0"
eslint-plugin-react@^7.11.1: eslint-plugin-react@^7.11.1:
version "7.12.4" version "7.12.4"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.12.4.tgz#b1ecf26479d61aee650da612e425c53a99f48c8c" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.12.4.tgz#b1ecf26479d61aee650da612e425c53a99f48c8c"
@ -3526,6 +3533,11 @@ fast-deep-equal@^2.0.1:
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"
integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=
fast-diff@^1.1.2:
version "1.2.0"
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03"
integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==
fast-json-stable-stringify@^2.0.0: fast-json-stable-stringify@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
@ -6882,6 +6894,15 @@ posix-character-classes@^0.1.0:
resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=
pre-commit@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/pre-commit/-/pre-commit-1.2.2.tgz#dbcee0ee9de7235e57f79c56d7ce94641a69eec6"
integrity sha1-287g7p3nI15X95xW186UZBpp7sY=
dependencies:
cross-spawn "^5.0.1"
spawn-sync "^1.0.15"
which "1.2.x"
prelude-ls@~1.1.2: prelude-ls@~1.1.2:
version "1.1.2" version "1.1.2"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
@ -6911,6 +6932,13 @@ prettier-eslint@^8.8.2:
typescript-eslint-parser "^16.0.0" typescript-eslint-parser "^16.0.0"
vue-eslint-parser "^2.0.2" vue-eslint-parser "^2.0.2"
prettier-linter-helpers@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"
integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==
dependencies:
fast-diff "^1.1.2"
prettier@^1.14.3, prettier@^1.7.0: prettier@^1.14.3, prettier@^1.7.0:
version "1.16.4" version "1.16.4"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.4.tgz#73e37e73e018ad2db9c76742e2647e21790c9717" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.4.tgz#73e37e73e018ad2db9c76742e2647e21790c9717"
@ -9136,6 +9164,13 @@ which-module@^2.0.0:
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
which@1.2.x:
version "1.2.14"
resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5"
integrity sha1-mofEN48D6CfOyvGs31bHNsAcFOU=
dependencies:
isexe "^2.0.0"
which@^1.2.10, which@^1.2.11, which@^1.2.12, which@^1.2.9, which@^1.3.0: which@^1.2.10, which@^1.2.11, which@^1.2.12, which@^1.2.9, which@^1.3.0:
version "1.3.1" version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"