Skip to content

Commit

Permalink
Stop using prettier integrated with eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
julienw committed Sep 1, 2023
1 parent f384166 commit 703a9d3
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 42 deletions.
6 changes: 2 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ module.exports = {
node: true,
},
parser: '@babel/eslint-parser',
plugins: ['@babel', 'react', 'flowtype', 'import', 'prettier'],
plugins: ['@babel', 'react', 'flowtype', 'import'],
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:flowtype/recommended',
// This works with the prettier plugin, this needs to be at the end always.
// Replace it with the "prettier" config if we remove the plugin.
'plugin:prettier/recommended',
'prettier',
],
parserOptions: {
ecmaVersion: '2017',
Expand Down
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
src/types/libdef/npm
docs-user
src/test/fixtures/
res/zee-worker.js
dist
1 change: 0 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module.exports = {
singleQuote: true,
trailingComma: 'es5',
parser: "babel-flow",
};
7 changes: 0 additions & 7 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
{
"plugins": [
"stylelint-prettier"
],
"extends": [
"stylelint-config-standard",
"stylelint-config-idiomatic-order",
],
"rules": {
"prettier/prettier": [
true,
{ "parser": "css" }
],
"alpha-value-notation": null,
"function-url-quotes": null,
"keyframes-name-pattern": null,
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
"build-l10n-prod:quiet": "yarn build:clean && yarn build-photon && cross-env NODE_ENV=production L10N=1 webpack",
"build-l10n-prod": "yarn build-l10n-prod:quiet --progress",
"build-photon": "webpack --config res/photon/webpack.config.js",
"lint": "run-p lint-js lint-css",
"lint": "run-p lint-js lint-css prettier-run",
"lint-fix": "run-p lint-fix-js lint-fix-css prettier-fix",
"lint-js": "eslint *.js bin src --report-unused-disable-directives --cache --cache-strategy content",
"lint-fix-js": "yarn lint-js --fix",
"lint-css": "stylelint \"src/**/*.css\" \"res/**/*.css\"",
"lint-fix-css": "yarn lint-css --fix",
"prettier-json": "prettier --write src/**/*.json",
"prettier-run": "prettier --check .",
"prettier-fix": "prettier --write .",
"flow": "flow --max-warnings 0",
"flow:ci": "flow check --max-warnings 0",
"flow-stop": "flow stop",
Expand Down Expand Up @@ -128,7 +130,6 @@
"eslint-plugin-jest": "^27.2.3",
"eslint-plugin-jest-dom": "^5.0.2",
"eslint-plugin-jest-formatting": "^3.1.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-testing-library": "^5.11.1",
"fake-indexeddb": "^4.0.2",
Expand Down Expand Up @@ -159,7 +160,6 @@
"stylelint": "^15.10.3",
"stylelint-config-idiomatic-order": "^9.0.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-prettier": "^3.0.0",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
Expand Down
26 changes: 0 additions & 26 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4998,13 +4998,6 @@ eslint-plugin-jest@^27.2.3:
dependencies:
"@typescript-eslint/utils" "^5.10.0"

eslint-plugin-prettier@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b"
integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==
dependencies:
prettier-linter-helpers "^1.0.0"

eslint-plugin-react@^7.33.2:
version "7.33.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz#69ee09443ffc583927eafe86ffebb470ee737608"
Expand Down Expand Up @@ -5378,11 +5371,6 @@ 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"
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@^3.2.11, fast-glob@^3.2.9, fast-glob@^3.3.1:
version "3.3.1"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4"
Expand Down Expand Up @@ -10329,13 +10317,6 @@ prelude-ls@~1.1.2:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=

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.19.1:
version "1.19.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
Expand Down Expand Up @@ -12087,13 +12068,6 @@ stylelint-order@^5.0.0:
postcss "^8.3.11"
postcss-sorting "^7.0.1"

stylelint-prettier@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/stylelint-prettier/-/stylelint-prettier-3.0.0.tgz#57028b99866ed4c3ae045ddd891bf9a77d274726"
integrity sha512-kIks1xw6np0zElokMT2kP6ar3S4MBoj6vUtPJuND1pFELMpZxVS/0uHPR4HDAVn0WAD3I5oF0IA3qBFxBpMkLg==
dependencies:
prettier-linter-helpers "^1.0.0"

stylelint@^15.10.3:
version "15.10.3"
resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-15.10.3.tgz#995e4512fdad450fb83e13f3472001f6edb6469c"
Expand Down

0 comments on commit 703a9d3

Please sign in to comment.