Skip to content

Commit 32df7df

Browse files
authored
Merge pull request #91 from atmina/remove-eslint-plugin-prettier
Remove eslint-plugin-prettier
2 parents 1cafc27 + b392192 commit 32df7df

4 files changed

Lines changed: 5 additions & 50 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
A collection of optionated in-house linting rules.
44

55
- ESLint with TypeScript
6-
- Prettier (via ESLint)
6+
- Prettier (as of version 2.0, this is [no longer integrated as an ESLint plugin](https://prettier.io/docs/en/integrating-with-linters.html#notes))
77

88
ESLint configuration is provided in the `eslint.config.js`, aka. "Flat Config" format.
99

eslint/prettier.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
1-
// Runs Prettier as an ESLint rule and reports differences as individual ESLint issues.
2-
const prettierPlugin = require('eslint-plugin-prettier');
3-
41
// Turns off all rules that are unnecessary or might conflict with Prettier.
52
const prettierOverrides = require('eslint-config-prettier');
63

7-
const prettierOptions = require('../prettier');
8-
94
/**
105
* @type {import('eslint').Linter.FlatConfig}
116
*/
127
module.exports = {
138
files: ['**/*.{ts,tsx,js,jsx}'],
14-
plugins: {prettier: prettierPlugin},
159
rules: {
1610
...prettierOverrides.rules,
17-
...prettierPlugin.configs.recommended.rules,
18-
// Note: this effectively locks in our Prettier configuration (ignoring
19-
// .prettierrc completely). Since this is an opinionated setup, we probably
20-
// don't want to allow customization anyway.
21-
'prettier/prettier': ['warn', prettierOptions],
2211
},
2312
};

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@atmina/linting",
3-
"version": "1.1.0",
3+
"version": "2.0.0",
44
"description": "A collection of opinionated in-house linting rules.",
55
"main": "index.js",
66
"scripts": {},
@@ -38,7 +38,6 @@
3838
"eslint-config-prettier": "^9.0.0",
3939
"eslint-import-resolver-typescript": "^3.5.3",
4040
"eslint-plugin-import": "^2.27.5",
41-
"eslint-plugin-prettier": "^5.0.0-alpha.2",
4241
"eslint-plugin-react": "^7.32.2",
4342
"eslint-plugin-react-hooks": "^4.6.0",
4443
"eslint-plugin-tailwindcss": "^3.10.1",

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)