Skip to content

Commit

Permalink
update eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
PheRum committed May 15, 2024
1 parent f79d349 commit 4d765b0
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
export default [
{
env: {
browser: true,
es6: true,
},
parser: "babel-eslint",
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
},
rules: {
"no-debugger": "warn",
"no-dupe-keys": "warn",
"no-dupe-args": "warn",
"no-duplicate-case": "warn",
"no-empty": "warn",
"no-extra-semi": "warn",
"no-func-assign": "warn",
"no-obj-calls": "warn",
"no-sparse-arrays": "warn",
"no-unreachable": "warn",
"valid-typeof": "warn",
"no-multi-spaces": "warn",
"no-with": "warn",
curly: "warn",
"no-unused-expressions": "warn",
"no-shadow-restricted-names": "warn",
"no-undefined": "off",
camelcase: "warn",

indent: [
"warn",
4,
{
MemberExpression: "off",
SwitchCase: 1,
},
],

"array-bracket-spacing": ["warn", "never"],
"comma-spacing": "warn",
"comma-style": "warn",
"computed-property-spacing": "warn",
"func-call-spacing": "warn",
"key-spacing": "warn",
"keyword-spacing": "warn",
"new-cap": "warn",
"no-mixed-spaces-and-tabs": "warn",
"one-var": [
"warn",
{
var: "never",
let: "never",
const: "never",
},
],
semi: "warn",
"space-in-parens": ["warn", "never"],
"space-before-blocks": "warn",
"unicode-bom": "warn",
"new-parens": "warn",
"no-nested-ternary": "warn",
"space-infix-ops": "warn",
"space-unary-ops": ["warn", { words: true, nonwords: false }],

// ES2015
"constructor-super": "warn",
"no-this-before-super": "warn",
"no-var": "warn",
},
},
];

0 comments on commit 4d765b0

Please sign in to comment.