Skip to content

Commit 466cecb

Browse files
committed
chore: migrate packages to shared ESLint and Prettier configs
1 parent 4a68c06 commit 466cecb

9 files changed

Lines changed: 37 additions & 156 deletions

File tree

packages/common/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
"clean:scripts": "find src -name '*.js' -delete",
2929
"lint": "eslint . && prettier --check .",
3030
"fix": "eslint . --fix && prettier --write .",
31-
"taze": "taze major -w",
32-
"lint-staged": "lint-staged"
31+
"taze": "taze major -w"
3332
},
3433
"devDependencies": {
3534
"@nanoforge/utils-eslint-config": "workspace:^",

packages/music/.prettierrc

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

packages/music/eslint.config.js

Lines changed: 2 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,3 @@
1-
import pluginJs from "@eslint/js";
2-
import eslintConfigPrettier from "eslint-config-prettier";
3-
import globals from "globals";
4-
import tseslint from "typescript-eslint";
5-
import pluginJest from "eslint-plugin-jest";
1+
import config from "@nanoforge/utils-eslint-config";
62

7-
export default [
8-
{
9-
files: ["src/**/*.{ts}"],
10-
},
11-
{ languageOptions: { globals: globals.node } },
12-
13-
14-
pluginJs.configs.recommended,
15-
...tseslint.configs.recommended,
16-
...tseslint.configs.strict,
17-
eslintConfigPrettier,
18-
{ ignores: ["**/*.js"] },
19-
{
20-
rules: {
21-
"@typescript-eslint/consistent-type-imports": [
22-
"error",
23-
{
24-
disallowTypeAnnotations: true,
25-
fixStyle: "inline-type-imports",
26-
prefer: "type-imports",
27-
},
28-
],
29-
"@typescript-eslint/no-extraneous-class": "off",
30-
"@typescript-eslint/no-empty-object-type": "off",
31-
"@typescript-eslint/no-explicit-any": "off",
32-
"@typescript-eslint/ban-ts-comment": "off",
33-
"@typescript-eslint/member-ordering": [
34-
"error",
35-
{
36-
default: [
37-
"static-field",
38-
"field",
39-
"public-static-method",
40-
"constructor",
41-
"method",
42-
"protected-method",
43-
"private-method",
44-
],
45-
},
46-
],
47-
},
48-
},
49-
{
50-
files: ["**/*.spec.ts"],
51-
plugins: { jest: pluginJest },
52-
languageOptions: {
53-
globals: pluginJest.environments.globals.globals,
54-
},
55-
rules: {
56-
"jest/no-disabled-tests": "warn",
57-
"jest/no-focused-tests": "error",
58-
"jest/no-identical-title": "error",
59-
"jest/prefer-to-have-length": "warn",
60-
"jest/valid-expect": "error",
61-
}
62-
}
63-
];
3+
export default config;

packages/music/package.json

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,39 +28,19 @@
2828
"clean:scripts": "find src -name '*.js' -delete",
2929
"lint": "eslint . && prettier --check .",
3030
"fix": "eslint . --fix && prettier --write .",
31-
"taze": "taze major -w",
32-
"lint-staged": "lint-staged"
31+
"taze": "taze major -w"
3332
},
3433
"dependencies": {
3534
"@nanoforge/common": "workspace:^"
3635
},
3736
"devDependencies": {
38-
"@commitlint/cli": "^20.0.0",
39-
"@commitlint/config-conventional": "^20.0.0",
40-
"@eslint/js": "^9.36.0",
41-
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
42-
"@types/node": "^22.18.7",
43-
"eslint": "^9.36.0",
44-
"eslint-config-prettier": "^10.1.8",
45-
"eslint-plugin-format": "^1.0.2",
46-
"eslint-plugin-jest": "^29.0.1",
47-
"eslint-plugin-prettier": "^5.5.4",
48-
"globals": "^16.4.0",
49-
"lint-staged": "^16.2.3",
50-
"prettier": "^3.6.2",
51-
"taze": "^19.7.0",
52-
"typescript": "^5.9.2",
53-
"typescript-eslint": "^8.45.0"
37+
"@nanoforge/utils-eslint-config": "workspace:^",
38+
"@nanoforge/utils-prettier-config": "workspace:^",
39+
"taze": "^19.7.0"
5440
},
5541
"engines": {
5642
"node": "23.6.0",
5743
"pnpm": "10.17.1"
5844
},
59-
"packageManager": "pnpm@10.17.1",
60-
"lint-staged": {
61-
"**/*.{js,ts}": [
62-
"eslint --fix",
63-
"prettier --write"
64-
]
65-
}
45+
"packageManager": "pnpm@10.17.1"
6646
}

packages/music/prettier.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import config from "@nanoforge/utils-prettier-config";
2+
3+
export default config;

packages/music/src/music.library.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { BaseMusicLibrary } from "@nanoforge/common";
2-
import { NfNotFound } from "@nanoforge/common/src/exception";
1+
import { BaseMusicLibrary, NfNotFound } from "@nanoforge/common";
32

43
export class MusicLibrary extends BaseMusicLibrary {
54
private muted: boolean;

packages/sound/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@
3636
"devDependencies": {
3737
"@nanoforge/utils-eslint-config": "workspace:^",
3838
"@nanoforge/utils-prettier-config": "workspace:^",
39-
"@types/node": "^22.18.7",
40-
"taze": "^19.7.0",
41-
"typescript": "^5.9.2"
39+
"taze": "^19.7.0"
4240
},
4341
"engines": {
4442
"node": "23.6.0",

packages/tsconfig.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,32 @@
11
{
22
"files": [],
33
"references": [
4+
{
5+
"path": "./asset-manager/tsconfig.build.json"
6+
},
47
{
58
"path": "./common/tsconfig.build.json"
69
},
10+
{
11+
"path": "./config/tsconfig.build.json"
12+
},
713
{
814
"path": "./core/tsconfig.build.json"
915
},
1016
{
1117
"path": "./ecs/tsconfig.build.json"
18+
},
19+
{
20+
"path": "./graphics-2d/tsconfig.build.json"
21+
},
22+
{
23+
"path": "./input/tsconfig.build.json"
24+
},
25+
{
26+
"path": "./music/tsconfig.build.json"
27+
},
28+
{
29+
"path": "./sound/tsconfig.build.json"
1230
}
1331
]
1432
}

pnpm-lock.yaml

Lines changed: 6 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)