Skip to content

Commit

Permalink
chore: upgrade to eslint v9
Browse files Browse the repository at this point in the history
  • Loading branch information
3cp committed Oct 24, 2024
1 parent a8edce7 commit 26080b8
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 66 deletions.
55 changes: 0 additions & 55 deletions common/.eslintrc.json

This file was deleted.

68 changes: 68 additions & 0 deletions common/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import eslint from "@eslint/js";
// @if babel
import babelParser from "@babel/eslint-parser";
// @endif
// @if typescript
import tseslint from 'typescript-eslint';
import tsParser from "@typescript-eslint/parser";
// @endif
import globals from "globals";

export default [
eslint.configs.recommended,
// @if typescript
...tseslint.configs.recommended,
// @endif
{
root: true,
// @if typescript
files: ["**/*.ts"],
// @endif

rules: {
"no-unused-vars": 0,
// @if typescript
"@typescript-eslint/no-unused-vars": 0,
"@typescript-eslint/no-explicit-any": 0,
// @endif
"no-prototype-builtins": 0,
"no-console": 0,
"getter-return": 0
},

languageOptions: {
globals: {
...globals.builtin,
...globals.nodeBuiltin,
...globals.browser,
...globals.node,
// @if karma
...globals.jasmine,
// @endif
// @if jest
...globals.jest,
// @endif
},

// @if babel
parser: babelParser,
// @endif
// @if typescript
parser: tsParser,
// @endif
ecmaVersion: 2019,
sourceType: "module",
parserOptions: {
// @if babel
ecmaFeatures: {
legacyDecorators: true
},
// @endif
// @if typescript
project: "./tsconfig.json",
tsconfigRootDir: ".",
// @endif
},
},
}
];
16 changes: 8 additions & 8 deletions common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
// @endif
"devDependencies": {
"eslint": "^8.43.0",
"eslint": "^9.13.0",
"globals": "^15.10.0",
"aurelia-cli": "^3.0.3",
"aurelia-testing": "^1.1.0",
"gulp": "^4.0.2",
Expand All @@ -28,21 +29,20 @@
// @endif

// @if babel
"@babel/eslint-parser": "^7.25.8",
"@babel/plugin-proposal-decorators": "^7.25.7",
"@babel/eslint-parser": "^7.25.9",
"@babel/plugin-proposal-decorators": "^7.25.9",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-env": "^7.25.8",
"@babel/preset-env": "^7.25.9",
"@babel/core": "^7.25.8",
"@babel/register": "^7.25.7",
"@babel/register": "^7.25.9",
"regenerator-runtime": "^0.14.1",
// @endif

// @if typescript
"typescript": "^5.6.3",
"tslib": "^2.8.0",
"@types/node": "^22.7.8",
"@typescript-eslint/eslint-plugin": "^8.11.0",
"@typescript-eslint/parser": "^8.11.0",
"@types/node": "^22.7.9",
"typescript-eslint": "^8.8.1",
// @endif
},
// @if postcss || babel
Expand Down
2 changes: 1 addition & 1 deletion jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

// @if typescript
"ts-jest": "^29.2.5",
"@types/jest": "^29.5.13",
"@types/jest": "^29.5.14",
// @endif
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@

// @if sass
"sass-loader": "^16.0.2",
"sass": "^1.80.3",
"sass": "^1.80.4",
// @endif

// @if stylus
"stylus-loader": "^8.1.1",
"stylus": "^0.64.0",
// @endif

"html-webpack-plugin": "^5.6.2",
"html-webpack-plugin": "^5.6.3",
"copy-webpack-plugin": "^12.0.2",
"mini-css-extract-plugin": "^2.9.1",
"aurelia-webpack-plugin": "^5.0.6",
Expand Down

0 comments on commit 26080b8

Please sign in to comment.