Skip to content

Commit

Permalink
chore(dev-deps): eslint v9
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Apr 21, 2024
1 parent 988fe46 commit 3aaed77
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 83 deletions.
39 changes: 0 additions & 39 deletions .eslintrc.js

This file was deleted.

41 changes: 41 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import globals from 'globals';

export default defineConfig([
js.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
ecmaVersion: 2020,
sourceType: 'module',
globals: {
...globals.node,
...globals.jasmine,
},
},
},
{
rules: {
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/triple-slash-reference': 'off',
'@typescript-eslint/no-empty-interface': 'off',
},
},
{
files: ['*.test.ts*'],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
{ ignores: ['dist'] },
eslintPluginPrettierRecommended,
]);

/** @param config {import('eslint').Linter.FlatConfig} */
function defineConfig(config) {
return config;
}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"build": "rollup --config rollup.config.ts --configPlugin typescript",
"test": "vitest run",
"test:watch": "vitest watch",
"lint": "eslint . --max-warnings 0 --ext .js,.ts",
"lint": "eslint . --max-warnings 0",
"validate": "pnpm build && pnpm lint && pnpm test"
},
"repository": {
Expand All @@ -57,14 +57,14 @@
"aria-live-capture": "^1.0.2"
},
"devDependencies": {
"@eslint/js": "^9.1.1",
"@types/node": "^20.12.7",
"@typescript-eslint/eslint-plugin": "^7.6.0",
"@typescript-eslint/parser": "^7.6.0",
"@vitest/expect": "^1.5.0",
"esbuild": "^0.20.2",
"eslint": "^9.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"globals": "^15.0.0",
"jsdom": "^24.0.0",
"prettier": "^3.2.5",
"rollup": "^4.14.2",
Expand All @@ -73,6 +73,7 @@
"rollup-plugin-local-import": "^1.2.0",
"rollup-plugin-typescript": "^1.0.1",
"typescript": "^5.4.5",
"typescript-eslint": "^7.7.0",
"vitest": "^1.5.0"
},
"packageManager": "pnpm@8.15.7",
Expand Down
109 changes: 68 additions & 41 deletions pnpm-lock.yaml

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

0 comments on commit 3aaed77

Please sign in to comment.