Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .eslintrc.js

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.4.0
with:
node-version: 20
node-version: 20
- name: 'Install dependencies'
run: npm install
- name: 'Run linter'
run: ESLINT_USE_FLAT_CONFIG=false npm run lint
run: npm run lint
auto-merge:
name: 'dependabot-auto-merge'
needs: linter
Expand Down
38 changes: 38 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { defineConfig } from 'eslint/config';
import globals from 'globals';
import js from '@eslint/js';
import prettier from 'eslint-plugin-prettier/recommended';

export default defineConfig([
js.configs.recommended,
prettier,
{
languageOptions: {
globals: {
...globals.browser,
...globals.greasemonkey,
...globals.jquery,
LOGGER: true,
MBImportStyle: true,
MBImport: true,
MBLinks: true,
MBSearchItStyle: true,
},
},

rules: {
'prettier/prettier': 'error',
'prefer-template': 'error',
'no-console': 'off',
'no-inner-declarations': 'warn',
'no-global-assign': 'warn',
'no-redeclare': 'warn',
'no-self-assign': 'warn',
'no-undef': 'warn',
'no-useless-concat': 'warn',
'no-useless-escape': 'warn',
'no-unused-vars': 'warn',
'no-var': 'warn',
},
},
]);
26 changes: 22 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "musicbrainz-userscripts",
"version": "1.0.0",
"description": "Collection of userscripts for MusicBrainz",
"main": "index.js",
"type": "module",
"directories": {
"lib": "lib"
},
Expand Down Expand Up @@ -31,10 +31,11 @@
"homepage": "https://github.com/murdos/musicbrainz-userscripts#readme",
"devDependencies": {
"@eslint-community/eslint-utils": "^4.6.1",
"@eslint/js": "^9.25.1",
"eslint": "^9.25.1",
"eslint-config-prettier": "^10.1.2",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-prettier": "^5.2.6",
"globals": "^16.0.0",
"prettier": "^3.5.3"
}
}
Loading