Skip to content

Commit

Permalink
Merge pull request #91 from atmina/remove-eslint-plugin-prettier
Browse files Browse the repository at this point in the history
Remove eslint-plugin-prettier
  • Loading branch information
mvarendorff2 authored Oct 26, 2023
2 parents 1cafc27 + b392192 commit 32df7df
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 50 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
A collection of optionated in-house linting rules.

- ESLint with TypeScript
- Prettier (via ESLint)
- 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))

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

Expand Down
11 changes: 0 additions & 11 deletions eslint/prettier.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
// Runs Prettier as an ESLint rule and reports differences as individual ESLint issues.
const prettierPlugin = require('eslint-plugin-prettier');

// Turns off all rules that are unnecessary or might conflict with Prettier.
const prettierOverrides = require('eslint-config-prettier');

const prettierOptions = require('../prettier');

/**
* @type {import('eslint').Linter.FlatConfig}
*/
module.exports = {
files: ['**/*.{ts,tsx,js,jsx}'],
plugins: {prettier: prettierPlugin},
rules: {
...prettierOverrides.rules,
...prettierPlugin.configs.recommended.rules,
// Note: this effectively locks in our Prettier configuration (ignoring
// .prettierrc completely). Since this is an opinionated setup, we probably
// don't want to allow customization anyway.
'prettier/prettier': ['warn', prettierOptions],
},
};
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@atmina/linting",
"version": "1.1.0",
"version": "2.0.0",
"description": "A collection of opinionated in-house linting rules.",
"main": "index.js",
"scripts": {},
Expand Down Expand Up @@ -38,7 +38,6 @@
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-typescript": "^3.5.3",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^5.0.0-alpha.2",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-tailwindcss": "^3.10.1",
Expand Down
39 changes: 3 additions & 36 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 32df7df

Please sign in to comment.