Skip to content

Commit

Permalink
Follow unicorn rules (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore authored Jan 18, 2025
1 parent 27af78b commit 8050991
Show file tree
Hide file tree
Showing 11 changed files with 333 additions and 337 deletions.
21 changes: 0 additions & 21 deletions .eslintrc.json

This file was deleted.

26 changes: 19 additions & 7 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import prettier from 'eslint-plugin-prettier';
import unicorn from 'eslint-plugin-unicorn';
import globals from 'globals';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
Expand All @@ -10,35 +11,46 @@ const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
allConfig: js.configs.all
});

export default [
{
ignores: [],
ignores: []
},
...compat.extends('eslint:recommended'),
...compat.extends('eslint:recommended', 'plugin:unicorn/recommended'),
{
plugins: {
prettier,
unicorn
},

languageOptions: {
globals: {
...globals.node,
...globals.node
},
ecmaVersion: 'latest',
sourceType: 'module'
},

rules: {
'prettier/prettier': [
'error',
{
singleQuote: true,
},
trailingComma: 'none',
arrowParens: 'avoid',
embeddedLanguageFormatting: 'off'
}
],

'require-atomic-updates': 0,
'no-extra-semi': 0,
'no-mixed-spaces-and-tabs': 0,
},
},
'unicorn/filename-case': 0,
'unicorn/prevent-abbreviations': 0,
'unicorn/no-array-reduce': 0,
'unicorn/prefer-spread': 0
}
}
];
Loading

0 comments on commit 8050991

Please sign in to comment.