Skip to content

Commit

Permalink
chore: harmonize eslint configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Davids <[email protected]>
  • Loading branch information
sdavids committed Jan 16, 2025
1 parent 600f05f commit fe18ae4
Showing 1 changed file with 26 additions and 22 deletions.
48 changes: 26 additions & 22 deletions hp/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,31 @@ export default [
...js.configs.all,
name: 'eslint/js/all',
},
{
files: ['**/*.json'],
ignores: ['package-lock.json'],
language: 'json/json',
plugins: {
json,
},
...json.configs.recommended,
name: 'eslint/json/recommended',
},
{
files: ['**/*.md'],
language: 'markdown/gfm',
plugins: {
markdown,
},
name: 'eslint/markdown/recommended',
},
{
files: ['src/j/*.js', 'src/j/**/*.js'],
...compat.configs['flat/recommended'],
name: 'eslint/browser-compat',
},
{
files: ['**/*.{js,mjs}'],
name: 'sdavids/defaults/js',
rules: {
'capitalized-comments': 'off',
'func-names': ['error', 'always', { generators: 'as-needed' }],
Expand All @@ -43,11 +65,10 @@ export default [
'sort-vars': 'off',
radix: 'off',
},
name: 'sdavids/js/defaults',
},
{
files: ['src/j/*.js', 'src/j/**/*.js'],
...compat.configs['flat/recommended'],
name: 'sdavids/js/web',
languageOptions: {
globals: {
...globals.browser,
Expand All @@ -57,32 +78,15 @@ export default [
ecmaVersion: 2021,
},
},
name: 'sdavids/js/browser',
},
{
files: ['scripts/*.mjs'],
name: 'sdavids/js/nodejs',
languageOptions: {
globals: {
...globals.node,
},
},
},
{
files: ['**/*.json'],
ignores: ['package-lock.json'],
language: 'json/json',
plugins: {
json,
},
...json.configs.recommended,
name: 'eslint/json/recommended',
},
{
files: ['**/*.md'],
language: 'markdown/gfm',
plugins: {
markdown,
},
name: 'eslint/markdown/recommended',
name: 'sdavids/js/node',
},
];

0 comments on commit fe18ae4

Please sign in to comment.