Skip to content

Commit 6357ee1

Browse files
authored
Merge pull request #1133 from actions/ncalteen/projectService
Switch to ESLint projectService
2 parents 6be9c60 + 7760bd8 commit 6357ee1

File tree

7 files changed

+57
-95
lines changed

7 files changed

+57
-95
lines changed

.github/copilot-instructions.md

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,32 @@ it is generated from.
1111

1212
## Repository Structure
1313

14-
| Path | Description |
15-
| ---------------------- | -------------------------------------------------------- |
16-
| `__fixtures__/` | Unit Test Fixtures |
17-
| `__tests__/` | Unit Tests |
18-
| `.devcontainer/` | Development Container Configuration |
19-
| `.github/` | GitHub Configuration |
20-
| `.licenses/` | License Information |
21-
| `.vscode/` | Visual Studio Code Configuration |
22-
| `badges/` | Badges for readme |
23-
| `dist/` | Generated JavaScript Code |
24-
| `src/` | TypeScript Source Code |
25-
| `.env.example` | Environment Variables Example for `@github/local-action` |
26-
| `.licensed.yml` | Licensed Configuration |
27-
| `.markdown-lint.yml` | Markdown Linter Configuration |
28-
| `.node-version` | Node.js Version Configuration |
29-
| `.prettierrc.yml` | Prettier Formatter Configuration |
30-
| `.yaml-lint.yml` | YAML Linter Configuration |
31-
| `action.yml` | GitHub Action Metadata |
32-
| `CODEOWNERS` | Code Owners File |
33-
| `eslint.config.mjs` | ESLint Configuration |
34-
| `jest.config.js` | Jest Configuration |
35-
| `LICENSE` | License File |
36-
| `package.json` | NPM Package Configuration |
37-
| `README.md` | Project Documentation |
38-
| `rollup.config.ts` | Rollup Bundler Configuration |
39-
| `tsconfig.base.json` | Base TypeScript Configuration |
40-
| `tsconfig.eslint.json` | TypeScript Configuration for ESLint |
41-
| `tsconfig.json` | TypeScript Configuration |
14+
| Path | Description |
15+
| -------------------- | -------------------------------------------------------- |
16+
| `__fixtures__/` | Unit Test Fixtures |
17+
| `__tests__/` | Unit Tests |
18+
| `.devcontainer/` | Development Container Configuration |
19+
| `.github/` | GitHub Configuration |
20+
| `.licenses/` | License Information |
21+
| `.vscode/` | Visual Studio Code Configuration |
22+
| `badges/` | Badges for readme |
23+
| `dist/` | Generated JavaScript Code |
24+
| `src/` | TypeScript Source Code |
25+
| `.env.example` | Environment Variables Example for `@github/local-action` |
26+
| `.licensed.yml` | Licensed Configuration |
27+
| `.markdown-lint.yml` | Markdown Linter Configuration |
28+
| `.node-version` | Node.js Version Configuration |
29+
| `.prettierrc.yml` | Prettier Formatter Configuration |
30+
| `.yaml-lint.yml` | YAML Linter Configuration |
31+
| `action.yml` | GitHub Action Metadata |
32+
| `CODEOWNERS` | Code Owners File |
33+
| `eslint.config.mjs` | ESLint Configuration |
34+
| `jest.config.js` | Jest Configuration |
35+
| `LICENSE` | License File |
36+
| `package.json` | NPM Package Configuration |
37+
| `README.md` | Project Documentation |
38+
| `rollup.config.ts` | Rollup Bundler Configuration |
39+
| `tsconfig.json` | TypeScript Configuration |
4240

4341
## Environment Setup
4442

eslint.config.mjs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,9 @@ import _import from 'eslint-plugin-import'
99
import jest from 'eslint-plugin-jest'
1010
import prettier from 'eslint-plugin-prettier'
1111
import globals from 'globals'
12-
import path from 'node:path'
13-
import { fileURLToPath } from 'node:url'
1412

15-
const __filename = fileURLToPath(import.meta.url)
16-
const __dirname = path.dirname(__filename)
1713
const compat = new FlatCompat({
18-
baseDirectory: __dirname,
14+
baseDirectory: import.meta.dirname,
1915
recommendedConfig: js.configs.recommended,
2016
allConfig: js.configs.all
2117
})
@@ -52,16 +48,24 @@ export default [
5248
sourceType: 'module',
5349

5450
parserOptions: {
55-
project: ['tsconfig.eslint.json'],
56-
tsconfigRootDir: __dirname
51+
projectService: {
52+
allowDefaultProject: [
53+
'__fixtures__/*.ts',
54+
'__tests__/*.ts',
55+
'eslint.config.mjs',
56+
'jest.config.js',
57+
'rollup.config.ts'
58+
]
59+
},
60+
tsconfigRootDir: import.meta.dirname
5761
}
5862
},
5963

6064
settings: {
6165
'import/resolver': {
6266
typescript: {
6367
alwaysTryTypes: true,
64-
project: 'tsconfig.eslint.json'
68+
project: 'tsconfig.json'
6569
}
6670
}
6771
},

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default {
3131
'^.+\\.ts$': [
3232
'ts-jest',
3333
{
34-
tsconfig: 'tsconfig.eslint.json',
34+
tsconfig: 'tsconfig.json',
3535
useESM: true
3636
}
3737
]

package-lock.json

Lines changed: 1 addition & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsconfig.base.json

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

tsconfig.eslint.json

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

tsconfig.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
11
{
22
"$schema": "https://json.schemastore.org/tsconfig",
3-
"extends": "./tsconfig.base.json",
43
"compilerOptions": {
4+
"allowSyntheticDefaultImports": true,
5+
"declaration": false,
6+
"declarationMap": false,
7+
"esModuleInterop": true,
8+
"forceConsistentCasingInFileNames": true,
9+
"isolatedModules": true,
10+
"lib": ["ES2022"],
511
"module": "NodeNext",
612
"moduleResolution": "NodeNext",
7-
"outDir": "./dist"
13+
"newLine": "lf",
14+
"noImplicitAny": true,
15+
"noUnusedLocals": true,
16+
"noUnusedParameters": false,
17+
"outDir": "./dist",
18+
"pretty": true,
19+
"resolveJsonModule": true,
20+
"strict": true,
21+
"strictNullChecks": true,
22+
"target": "ES2022"
823
},
924
"exclude": ["__fixtures__", "__tests__", "coverage", "dist", "node_modules"],
1025
"include": ["src"]

0 commit comments

Comments
 (0)