style: enforce prettier rules in linter

This commit is contained in:
Tom French 2022-07-08 15:48:43 +01:00
parent ffc3e2f423
commit a44834c0d3
5 changed files with 36 additions and 13 deletions

10
.eslintrc.js Normal file
View file

@ -0,0 +1,10 @@
module.exports = {
plugins: ["prettier"],
extends: ["react-app"],
rules: {
"prettier/prettier": "error",
"no-unused-vars": "off",
"no-loop-func": "off",
"no-restricted-globals": "off"
}
};

4
.prettierrc.json Normal file
View file

@ -0,0 +1,4 @@
{
"singleQuote": false,
"trailingComma": "none"
}

View file

@ -67,18 +67,6 @@
"shelljs": "^0.8.2", "shelljs": "^0.8.2",
"source-map-support": "^0.5.21" "source-map-support": "^0.5.21"
}, },
"eslintConfig": {
"extends": "react-app",
"rules": {
"no-unused-vars": "off",
"no-loop-func": "off",
"no-restricted-globals": "off"
}
},
"prettier": {
"singleQuote": true,
"trailingComma": "none"
},
"resolutions": { "resolutions": {
"@babel/preset-env": "^7.15.1", "@babel/preset-env": "^7.15.1",
"@babel/core": "^7.15.1", "@babel/core": "^7.15.1",

View file

@ -45,6 +45,7 @@
"buffer": "^5.5.0", "buffer": "^5.5.0",
"damerau-levenshtein": "^1.0.4", "damerau-levenshtein": "^1.0.4",
"date-fns": "2.0.0-alpha.27", "date-fns": "2.0.0-alpha.27",
"eslint-plugin-prettier": "^3.1.4",
"esm": "^3.0.82", "esm": "^3.0.82",
"fake-indexeddb": "^3.1.3", "fake-indexeddb": "^3.1.3",
"fast-check": "^2.11.0", "fast-check": "^2.11.0",
@ -58,6 +59,7 @@
"mock-require": "^3.0.2", "mock-require": "^3.0.2",
"murmurhash": "^0.0.2", "murmurhash": "^0.0.2",
"perf-deets": "^1.0.15", "perf-deets": "^1.0.15",
"prettier": "^1.19.1",
"sanitize-filename": "^1.6.1", "sanitize-filename": "^1.6.1",
"search-query-parser": "^1.3.0", "search-query-parser": "^1.3.0",
"source-map": "^0.7.3", "source-map": "^0.7.3",

View file

@ -7445,6 +7445,13 @@ eslint-plugin-jsx-a11y@6.1.2:
has "^1.0.3" has "^1.0.3"
jsx-ast-utils "^2.0.1" jsx-ast-utils "^2.0.1"
eslint-plugin-prettier@^3.1.4:
version "3.4.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz#e9ddb200efb6f3d05ffe83b1665a716af4a387e5"
integrity sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==
dependencies:
prettier-linter-helpers "^1.0.0"
eslint-plugin-react@7.11.1: eslint-plugin-react@7.11.1:
version "7.11.1" version "7.11.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz#c01a7af6f17519457d6116aa94fc6d2ccad5443c" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz#c01a7af6f17519457d6116aa94fc6d2ccad5443c"
@ -7871,6 +7878,11 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
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-glob@^2.2.0, fast-glob@^2.2.2: fast-glob@^2.2.0, fast-glob@^2.2.2:
version "2.2.7" version "2.2.7"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d"
@ -14059,7 +14071,14 @@ prepend-http@^2.0.0:
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
prettier@^1.14.2, prettier@^1.18.1: 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.2, prettier@^1.18.1, prettier@^1.19.1:
version "1.19.1" version "1.19.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==