Skip to content

Commit

Permalink
feat(eslint): Add @stylistic/eslint-plugin to replace prettier/dprint
Browse files Browse the repository at this point in the history
  • Loading branch information
jsec committed Nov 23, 2023
1 parent 5b41591 commit a47f70d
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 40 deletions.
5 changes: 5 additions & 0 deletions .changeset/many-cooks-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@jarsec/eslint-config': minor
---

Add @stylistic/eslint-plugin
54 changes: 22 additions & 32 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,26 @@
require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = {
env: {
node: true
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/stylistic',
'plugin:perfectionist/recommended-natural',
'prettier'
],
overrides: [
{
files: ['**/*/*.{test,spec}.ts'],
rules: {
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/unbound-method': 'off'
}
}
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json'
},
plugins: ['import', 'perfectionist', '@typescript-eslint/eslint-plugin'],
settings: {
'import/resolver': {
node: true,
typescript: true
}
}
env: {
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/stylistic',
'plugin:perfectionist/recommended-natural',
'plugin:@stylistic/disable-legacy',
'plugin:@stylistic/recommended-extends',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
plugins: ['import', 'perfectionist', '@typescript-eslint/eslint-plugin', '@stylistic'],
settings: {
'import/resolver': {
node: true,
typescript: true,
},
},
}
1 change: 1 addition & 0 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"typescript": "^5.2.2"
},
"devDependencies": {
"@stylistic/eslint-plugin": "^1.4.0",
"@types/node": "^20.9.1",
"eslint": "^8.53.0",
"typescript": "^5.2.2"
Expand Down
63 changes: 55 additions & 8 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 a47f70d

Please sign in to comment.