Updated eslint prettier and other files
This commit is contained in:
@@ -1,8 +1,44 @@
|
||||
import globals from "globals";
|
||||
import pluginJs from "@eslint/js";
|
||||
|
||||
|
||||
export default [
|
||||
{languageOptions: { globals: {...globals.browser, ...globals.node} }},
|
||||
pluginJs.configs.recommended,
|
||||
];
|
||||
// .eslintrc.mjs
|
||||
export default {
|
||||
env: {
|
||||
browser: true,
|
||||
es2021: true,
|
||||
},
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:import/errors',
|
||||
'plugin:import/warnings',
|
||||
],
|
||||
parserOptions: {
|
||||
ecmaVersion: 12,
|
||||
sourceType: 'module',
|
||||
},
|
||||
rules: {
|
||||
'no-undef': 'error',
|
||||
'no-unused-vars': 'error',
|
||||
'no-console': 'warn',
|
||||
'no-unreachable': 'error',
|
||||
'no-constant-condition': 'warn',
|
||||
'no-debugger': 'warn',
|
||||
'no-dupe-keys': 'error',
|
||||
'no-duplicate-case': 'error',
|
||||
'no-empty': 'error',
|
||||
'no-extra-semi': 'error',
|
||||
'no-irregular-whitespace': 'error',
|
||||
'no-unexpected-multiline': 'error',
|
||||
'curly': 'error',
|
||||
'eqeqeq': 'error',
|
||||
'no-else-return': 'error',
|
||||
'no-multi-spaces': 'error',
|
||||
'no-with': 'error',
|
||||
'indent': ['error', 2],
|
||||
'linebreak-style': ['error', 'unix'],
|
||||
'quotes': ['error', 'single'],
|
||||
'semi': ['error', 'always'],
|
||||
'comma-dangle': ['error', 'always-multiline'],
|
||||
'max-len': ['error', { code: 80 }],
|
||||
'no-trailing-spaces': 'error',
|
||||
'eol-last': ['error', 'always'],
|
||||
'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 0 }],
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user