Skip to content

Commit 1bdcc0e

Browse files
committed
chore: upgrade to eslint v9
1 parent a8edce7 commit 1bdcc0e

File tree

9 files changed

+85
-83
lines changed

9 files changed

+85
-83
lines changed

common/.eslintrc.json

Lines changed: 0 additions & 55 deletions
This file was deleted.

common/eslint.config.mjs

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import eslint from "@eslint/js";
2+
// @if babel
3+
import babelParser from "@babel/eslint-parser";
4+
// @endif
5+
// @if typescript
6+
import tseslint from 'typescript-eslint';
7+
import tsParser from "@typescript-eslint/parser";
8+
// @endif
9+
import globals from "globals";
10+
11+
export default [
12+
eslint.configs.recommended,
13+
// @if typescript
14+
...tseslint.configs.recommended,
15+
// @endif
16+
{
17+
// @if typescript
18+
files: ["**/*.ts"],
19+
// @endif
20+
21+
rules: {
22+
"no-unused-vars": 0,
23+
// @if typescript
24+
"@typescript-eslint/no-unused-vars": 0,
25+
"@typescript-eslint/no-explicit-any": 0,
26+
// @endif
27+
"no-prototype-builtins": 0,
28+
"no-console": 0,
29+
"getter-return": 0
30+
},
31+
32+
languageOptions: {
33+
globals: {
34+
...globals.builtin,
35+
...globals.nodeBuiltin,
36+
...globals.browser,
37+
...globals.node,
38+
// @if karma
39+
...globals.jasmine,
40+
// @endif
41+
// @if jest
42+
...globals.jest,
43+
// @endif
44+
},
45+
46+
// @if babel
47+
parser: babelParser,
48+
// @endif
49+
// @if typescript
50+
parser: tsParser,
51+
// @endif
52+
ecmaVersion: 2019,
53+
sourceType: "module",
54+
parserOptions: {
55+
// @if babel
56+
ecmaFeatures: {
57+
legacyDecorators: true
58+
},
59+
// @endif
60+
// @if typescript
61+
project: "./tsconfig.json",
62+
tsconfigRootDir: ".",
63+
// @endif
64+
},
65+
},
66+
}
67+
];

common/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
},
1515
// @endif
1616
"devDependencies": {
17-
"eslint": "^8.43.0",
17+
"eslint": "^9.13.0",
18+
"globals": "^15.10.0",
1819
"aurelia-cli": "^3.0.3",
1920
"aurelia-testing": "^1.1.0",
2021
"gulp": "^4.0.2",
@@ -28,21 +29,20 @@
2829
// @endif
2930

3031
// @if babel
31-
"@babel/eslint-parser": "^7.25.8",
32-
"@babel/plugin-proposal-decorators": "^7.25.7",
32+
"@babel/eslint-parser": "^7.25.9",
33+
"@babel/plugin-proposal-decorators": "^7.25.9",
3334
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
34-
"@babel/preset-env": "^7.25.8",
35+
"@babel/preset-env": "^7.25.9",
3536
"@babel/core": "^7.25.8",
36-
"@babel/register": "^7.25.7",
37+
"@babel/register": "^7.25.9",
3738
"regenerator-runtime": "^0.14.1",
3839
// @endif
3940

4041
// @if typescript
4142
"typescript": "^5.6.3",
4243
"tslib": "^2.8.0",
43-
"@types/node": "^22.7.8",
44-
"@typescript-eslint/eslint-plugin": "^8.11.0",
45-
"@typescript-eslint/parser": "^8.11.0",
44+
"@types/node": "^22.7.9",
45+
"typescript-eslint": "^8.8.1",
4646
// @endif
4747
},
4848
// @if postcss || babel

jest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
// @if typescript
1414
"ts-jest": "^29.2.5",
15-
"@types/jest": "^29.5.13",
15+
"@types/jest": "^29.5.14",
1616
// @endif
1717
},
1818
"scripts": {

plugin/test__if_karma_or_jest/unit/.eslintrc__if_babel

Lines changed: 0 additions & 5 deletions
This file was deleted.

plugin/test__if_karma_or_jest/unit/binding-behaviors__if_plugin-scaffold-basic/primary-click.spec.ext

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import {StageComponent} from 'aurelia-testing';
22
import {bootstrap} from 'aurelia-bootstrapper';
33

44
function fireEvent(el, type, options) {
5-
var o = options || {};
6-
var e = document.createEvent('Event');
5+
const o = options || {};
6+
const e = document.createEvent('Event');
77
e.initEvent(type, true, true);
88
Object.keys(o).forEach(apply);
99
el.dispatchEvent(e);

scaffold-navigation/test__if_karma_or_jest/unit/.eslintrc__if_babel

Lines changed: 0 additions & 5 deletions
This file was deleted.

scaffold-navigation/test__if_karma_or_jest/unit__if_babel/users.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {Users} from '../../src/users';
22

33
class HttpStub {
44
fetch(url) {
5-
var response = this.itemStub;
5+
const response = this.itemStub;
66
this.url = url;
77
return new Promise((resolve) => {
88
resolve({ json: () => response });
@@ -14,10 +14,10 @@ class HttpStub {
1414

1515
describe('the Users module', () => {
1616
it('sets fetch response to users', async () => {
17-
var http = new HttpStub();
18-
var sut = new Users(http);
19-
var itemStubs = [1];
20-
var itemFake = [2];
17+
const http = new HttpStub();
18+
const sut = new Users(http);
19+
const itemStubs = [1];
20+
const itemFake = [2];
2121

2222
http.itemStub = itemStubs;
2323
await sut.activate();

webpack/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828

2929
// @if sass
3030
"sass-loader": "^16.0.2",
31-
"sass": "^1.80.3",
31+
"sass": "^1.80.4",
3232
// @endif
3333

3434
// @if stylus
3535
"stylus-loader": "^8.1.1",
3636
"stylus": "^0.64.0",
3737
// @endif
3838

39-
"html-webpack-plugin": "^5.6.2",
39+
"html-webpack-plugin": "^5.6.3",
4040
"copy-webpack-plugin": "^12.0.2",
4141
"mini-css-extract-plugin": "^2.9.1",
4242
"aurelia-webpack-plugin": "^5.0.6",

0 commit comments

Comments
 (0)