Skip to content

Commit 4d3574d

Browse files
committed
feat(config): remove Prettier plugin
BREAKING CHANGE: Removed [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier), and its prettier/prettier rule from the config. Projects should have Prettier running without ESLint anyway so it also processes other file types. Running it within Prettier offers marginal improvements only, and has a performance drawback, as well as unnecessarily tying together formatting choices governed by Prettier and the ESLint config.
1 parent 7e9244f commit 4d3574d

File tree

6 files changed

+1
-31
lines changed

6 files changed

+1
-31
lines changed

package-lock.json

Lines changed: 0 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
"dependencies": {
4141
"eslint-plugin-import": "^2.14.0",
4242
"eslint-plugin-jsx-a11y": "^6.1.1",
43-
"eslint-plugin-prettier": "^2.6.2",
4443
"eslint-plugin-react": "^7.11.1"
4544
},
4645
"peerDependencies": {

src/__snapshots__/semver.test.js.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ exports[`semver - should those tests break, consider releasing a new major versi
134134
Object {
135135
"eslint-plugin-import": "^2.14.0",
136136
"eslint-plugin-jsx-a11y": "^6.1.1",
137-
"eslint-plugin-prettier": "^2.6.2",
138137
"eslint-plugin-react": "^7.11.1",
139138
}
140139
`;

src/buildConfigs.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const path = require("path");
99
const prettier = require("prettier");
1010

1111
const { getComputedConfig, wrapInPlugin } = require("./config");
12-
const prettierConfig = require("../prettier.config");
1312
const base = require("./base");
1413

1514
const configs = {
@@ -20,10 +19,6 @@ const configs = {
2019
"prettier/flowtype",
2120
"prettier/react",
2221
]),
23-
plugins: ["prettier"],
24-
rules: Object.assign({}, base.rules, {
25-
"prettier/prettier": ["error", prettierConfig],
26-
}),
2722
},
2823
};
2924

src/buildConfigs.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe("buildConfigs", () => {
3838
expect(
3939
cli.executeOnText("import test from 'potato'; var foo;", "foo.js"),
4040
).toMatchObject({
41-
errorCount: 5,
41+
errorCount: 4,
4242
});
4343
});
4444
});

src/plugins.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
const importPlugin = require("eslint-plugin-import");
22
const jsxA11YPlugin = require("eslint-plugin-jsx-a11y");
33
const reactPlugin = require("eslint-plugin-react");
4-
const prettierPlugin = require("eslint-plugin-prettier");
54

65
const plugins = {
76
import: importPlugin,
87
"jsx-a11y": jsxA11YPlugin,
98
react: reactPlugin,
10-
prettier: prettierPlugin,
119
};
1210

1311
/**

0 commit comments

Comments
 (0)