Skip to content

Commit

Permalink
JS: Upated npm deps, upgraded eslint, new eslint config
Browse files Browse the repository at this point in the history
Upgraded eslint to 11, removed incompatible airbnb config as part of
process. ESlint config now in its own file.
  • Loading branch information
ssddanbrown committed Feb 23, 2025
1 parent c3a1fab commit 6548ea4
Show file tree
Hide file tree
Showing 4 changed files with 2,146 additions and 1,314 deletions.
64 changes: 64 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import globals from 'globals';
import js from '@eslint/js';

export default [
js.configs.recommended,
{
ignores: ['resources/**/*-stub.js', 'resources/**/*.ts'],
}, {
languageOptions: {
globals: {
...globals.browser,
},

ecmaVersion: 'latest',
sourceType: 'module',
},

rules: {
indent: ['error', 4],
'arrow-parens': ['error', 'as-needed'],

'padded-blocks': ['error', {
blocks: 'never',
classes: 'always',
}],

'object-curly-spacing': ['error', 'never'],

'space-before-function-paren': ['error', {
anonymous: 'never',
named: 'never',
asyncArrow: 'always',
}],

'import/prefer-default-export': 'off',

'no-plusplus': ['error', {
allowForLoopAfterthoughts: true,
}],

'arrow-body-style': 'off',
'no-restricted-syntax': 'off',
'no-continue': 'off',
'prefer-destructuring': 'off',
'class-methods-use-this': 'off',
'no-param-reassign': 'off',

'no-console': ['warn', {
allow: ['error', 'warn'],
}],

'no-new': 'off',

'max-len': ['error', {
code: 110,
tabWidth: 4,
ignoreUrls: true,
ignoreComments: false,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
}],
},
}];
Loading

0 comments on commit 6548ea4

Please sign in to comment.