28 lines
894 B
JavaScript
28 lines
894 B
JavaScript
module.exports = {
|
|
env: {
|
|
browser: true,
|
|
node: true,
|
|
},
|
|
parserOptions: {
|
|
ecmaVersion: 6,
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
}
|
|
},
|
|
rules: {
|
|
'no-cond-assign': ['error', 'except-parens'], // Don't assign in conditionals
|
|
'no-constant-condition': ['error', {
|
|
checkLoops: false,
|
|
}],
|
|
'no-control-regex': ['error'], // Don't match control characters (ASCII 0-31) in regex
|
|
'no-debugger': ['error'], // Disallow use of debugger statements
|
|
'no-dupe-args': ['error'], // No duplicate function arguments
|
|
'no-dupe-keys': ['error'], // No duplicate keys in object literals
|
|
'no-duplicate-case': ['error'], // No duplicate case labels in switch statements
|
|
'no-empty-character-class': ['error'], // No empty character classes in regex
|
|
'no-extra-boolean-cast': ['error'], // Disable unneeded boolean casts
|
|
quotes: ['warn', 'single', {
|
|
allowTemplateLiterals: true,
|
|
}],
|
|
},
|
|
}; |