diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..6283358 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +@avalon-vanguard:registry=https://git.avalonvanguard.com/api/packages/avalon-vanguard/npm/ diff --git a/eslint.config.mjs b/eslint.config.mjs index a8bc185..ca78d48 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,4 +1,4 @@ -import eslint from '@eslint/js'; +import avalonBase from '@avalon-vanguard/config/eslint'; import tseslint from 'typescript-eslint'; import globals from 'globals'; @@ -6,8 +6,8 @@ export default tseslint.config( { ignores: ['dist/**', 'node_modules/**', 'coverage/**', 'docs/**'], }, - eslint.configs.recommended, - ...tseslint.configs.recommended, + // @eslint/js recommended + typescript-eslint recommended, shared across avalon-vanguard + avalonBase, { languageOptions: { globals: { diff --git a/package-lock.json b/package-lock.json index fc191f4..834a6c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.4.1", "license": "MIT", "devDependencies": { + "@avalon-vanguard/config": "^1.0.0", "@babel/standalone": "^8.0.4", "@eslint/js": "^10.0.1", "@swc/core": "^1.15.47", @@ -26,6 +27,38 @@ "node": ">=20.0.0" } }, + "node_modules/@avalon-vanguard/config": { + "version": "1.0.0", + "resolved": "https://git.avalonvanguard.com/api/packages/avalon-vanguard/npm/%40avalon-vanguard%2Fconfig/-/1.0.0/config-1.0.0.tgz", + "integrity": "sha512-ySojd0OONRb9N9KT4CJeyLf5GUrfRP8jxfPTMRv3HUk7gld4VuzZd16lW774SfLkMBMOUYVVf9SKBMO+JATTTA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@eslint/js": "^10.0.0", + "angular-eslint": "^22.0.0", + "eslint": "^10.0.0", + "prettier": "^3.0.0", + "typescript": "^6.0.0", + "typescript-eslint": "^8.0.0" + }, + "peerDependenciesMeta": { + "@eslint/js": { + "optional": true + }, + "angular-eslint": { + "optional": true + }, + "eslint": { + "optional": true + }, + "prettier": { + "optional": true + }, + "typescript-eslint": { + "optional": true + } + } + }, "node_modules/@babel/helper-string-parser": { "version": "7.29.7", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", diff --git a/package.json b/package.json index 56e8884..42f43bf 100644 --- a/package.json +++ b/package.json @@ -79,6 +79,7 @@ }, "homepage": "https://avalon-vanguard.github.io/cereale/", "devDependencies": { + "@avalon-vanguard/config": "^1.0.0", "@babel/standalone": "^8.0.4", "@eslint/js": "^10.0.1", "@swc/core": "^1.15.47", diff --git a/tsconfig.json b/tsconfig.json index 6d02793..88608be 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,9 @@ { // Visit https://aka.ms/tsconfig to read more about this file + // Shared (@avalon-vanguard/config/tsconfig/library.json): sourceMap, declaration, + // declarationMap, noImplicitReturns, noImplicitOverride, noFallthroughCasesInSwitch, + // isolatedModules, skipLibCheck. + "extends": "@avalon-vanguard/config/tsconfig/library.json", "compilerOptions": { // File Layout "rootDir": "src", @@ -11,27 +15,17 @@ "lib": ["ESNext", "ESNext.Decorators"], "types": ["node"], - // Other Outputs - "sourceMap": true, - "declaration": true, - "declarationMap": true, - // Stricter Typechecking Options "noUncheckedIndexedAccess": true, "exactOptionalPropertyTypes": true, // Style Options - "noImplicitReturns": true, - "noImplicitOverride": true, "noUnusedLocals": true, "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true, // Recommended Options "strict": true, "strictPropertyInitialization": false, - "isolatedModules": true, - "skipLibCheck": true, // NOTE: no `experimentalDecorators`. v2 uses TC39 standard decorators, which is what // gives ClassFieldDecoratorContext and therefore compile-time checking of