Skip to content

Commit

Permalink
Add eslint-plugin-unicorn (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 authored Sep 23, 2023
1 parent 4612e05 commit 0552970
Show file tree
Hide file tree
Showing 17 changed files with 509 additions and 287 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = defineConfig({
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:prettier/recommended',
'plugin:unicorn/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
Expand All @@ -30,6 +31,7 @@ module.exports = defineConfig({
'prettier',
'spellcheck',
'inclusive-language',
'unicorn',
],
rules: {
curly: ['error'],
Expand All @@ -45,6 +47,11 @@ module.exports = defineConfig({
quotes: ['error', 'single', { avoidEscape: true }],
semi: ['error', 'always'],

'unicorn/consistent-destructuring': 'off',
'unicorn/no-null': 'off',
'unicorn/no-useless-switch-case': 'off',
'unicorn/prevent-abbreviations': 'off',

'@typescript-eslint/array-type': [
'warn',
{ default: 'array-simple', readonly: 'generic' },
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"eslint-plugin-jsdoc": "~46.8.1",
"eslint-plugin-prettier": "~5.0.0",
"eslint-plugin-spellcheck": "~0.0.20",
"eslint-plugin-unicorn": "~48.0.1",
"npm-run-all": "~4.1.5",
"prettier": "3.0.3",
"prettier-plugin-organize-imports": "~3.2.3",
Expand Down
Loading

0 comments on commit 0552970

Please sign in to comment.