mirror of
https://git.tt-rss.org/fox/tt-rss.git
synced 2025-10-14 04:21:00 +02:00
48 lines
1.0 KiB
JavaScript
48 lines
1.0 KiB
JavaScript
import globals from 'globals';
|
|
import js from '@eslint/js';
|
|
|
|
export default [
|
|
js.configs.recommended,
|
|
|
|
{
|
|
files: ['js/**/*.js', 'plugins/**/*.js'],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'script',
|
|
globals: {
|
|
...globals.browser,
|
|
|
|
// Dojo
|
|
dojo: 'readonly',
|
|
dijit: 'readonly'
|
|
}
|
|
},
|
|
|
|
rules: {
|
|
'no-undef': 'warn',
|
|
'no-unused-vars': 'warn',
|
|
'no-console': 'off',
|
|
|
|
'prefer-const': 'error',
|
|
'no-var': 'warn',
|
|
|
|
'eqeqeq': ['error', 'always'],
|
|
'no-caller': 'error',
|
|
'no-proto': 'error',
|
|
|
|
'linebreak-style': ['error', 'unix'],
|
|
'eol-last': 'error',
|
|
'no-trailing-spaces': 'error',
|
|
'no-multiple-empty-lines': ['error', { 'max': 2 }],
|
|
|
|
'keyword-spacing': ['error', { 'after': true, 'before': true }],
|
|
'block-spacing': ['error', 'always'],
|
|
'computed-property-spacing': ['error', 'never'],
|
|
|
|
'no-empty': ['error', { 'allowEmptyCatch': true }],
|
|
|
|
'max-statements-per-line': ['warn', { 'max': 2 }]
|
|
}
|
|
}
|
|
];
|