mirror of
https://github.com/zen-browser/www.git
synced 2025-07-07 17:05:32 +02:00
36 lines
826 B
TypeScript
36 lines
826 B
TypeScript
import { type Linter } from 'eslint'
|
|
|
|
import { javascriptFiles } from './shared'
|
|
|
|
export const javascriptConfig: Linter.Config = {
|
|
name: 'eslint/javascript',
|
|
files: javascriptFiles,
|
|
languageOptions: {
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'module',
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
},
|
|
},
|
|
rules: {
|
|
'no-unused-vars': [
|
|
'error',
|
|
{
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
ignoreRestSiblings: true,
|
|
},
|
|
],
|
|
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
|
'no-debugger': 'error',
|
|
'prefer-const': 'error',
|
|
'no-var': 'error',
|
|
'object-shorthand': 'error',
|
|
'prefer-template': 'error',
|
|
curly: ['error', 'all'],
|
|
eqeqeq: ['error', 'always'],
|
|
'no-implicit-coercion': 'error',
|
|
},
|
|
}
|