File tree Expand file tree Collapse file tree 14 files changed +79
-62
lines changed
Expand file tree Collapse file tree 14 files changed +79
-62
lines changed Original file line number Diff line number Diff line change 1+ # Contributing
2+
3+ Please be sure to read the contribution guidelines before making or requesting a change.
4+
5+ ## Code of Conduct
6+
7+ This project adheres to the [ OpenJS Foundation Code of Conduct] ( https://eslint.org/conduct ) . We kindly request that you read over our code of conduct before contributing.
8+
9+ ## Commands
10+
11+ ### Building
12+
13+ [ Rollup] ( https://rollupjs.org ) and [ TypeScript] ( https://www.typescriptlang.org ) are used to turn source files in ` packages/*/src/ ` into outputs in ` packages/*/dist/ ` .
14+
15+ ``` shell
16+ npm run build
17+ ```
18+
19+ ### Linting
20+
21+ ESLint is linted using ESLint.
22+ [ Building] ( #building ) the project must be done before it can lint itself.
23+
24+ ``` shell
25+ npm run lint
26+ ```
27+
28+ ### Type Checking
29+
30+ This project is written in JavaScript and uses [ TypeScript] ( https://www.typescriptlang.org ) to validate types declared in JSDoc comments.
31+
32+ ``` shell
33+ npm run test:types
34+ ```
35+
36+ Add ` --watch ` to run in a "watch" mode:
37+
38+ ``` shell
39+ npm run test:types -- --watch
40+ ```
Original file line number Diff line number Diff line change 1111 "lint:fix" : " eslint --fix ." ,
1212 "fmt" : " prettier --write ." ,
1313 "fmt:check" : " prettier --check ." ,
14- "test:jsr" : " npm run test:jsr --workspaces --if-present"
14+ "test:jsr" : " npm run test:jsr --workspaces --if-present" ,
15+ "test:types" : " tsc"
1516 },
1617 "workspaces" : [
1718 " packages/*"
2728 "!(*.{js,ts})" : " prettier --write --ignore-unknown"
2829 },
2930 "devDependencies" : {
31+ "@types/mocha" : " ^10.0.7" ,
3032 "eslint" : " ^9.11.1" ,
3133 "eslint-config-eslint" : " ^11.0.0" ,
3234 "got" : " ^14.4.1" ,
Original file line number Diff line number Diff line change 11{
2+ "extends" : " ../../tsconfig.base.json" ,
23 "files" : [" src/index.js" ],
34 "compilerOptions" : {
4- "declaration" : true ,
5- "emitDeclarationOnly" : true ,
6- "allowJs" : true ,
7- "checkJs" : true ,
8- "outDir" : " dist/esm" ,
9- "target" : " ES2022" ,
10- "moduleResolution" : " NodeNext" ,
11- "module" : " NodeNext"
5+ "outDir" : " dist/esm"
126 }
137}
Original file line number Diff line number Diff line change 11{
2+ "extends" : " ../../tsconfig.base.json" ,
23 "files" : [" src/index.js" ],
34 "compilerOptions" : {
4- "declaration" : true ,
5- "emitDeclarationOnly" : true ,
6- "allowJs" : true ,
7- "checkJs" : true ,
8- "outDir" : " dist/esm" ,
9- "target" : " ES2022" ,
10- "moduleResolution" : " NodeNext" ,
11- "module" : " NodeNext"
5+ "outDir" : " dist/esm"
126 }
137}
Original file line number Diff line number Diff line change 11{
2+ "extends" : " ../../tsconfig.base.json" ,
23 "files" : [" src/types.ts" ],
34 "compilerOptions" : {
4- "declaration" : true ,
5- "emitDeclarationOnly" : true ,
6- "allowJs" : true ,
7- "checkJs" : true ,
8- "outDir" : " dist/esm" ,
9- "target" : " ES2022" ,
10- "moduleResolution" : " NodeNext" ,
11- "module" : " NodeNext"
5+ "outDir" : " dist/esm"
126 }
137}
Original file line number Diff line number Diff line change 11{
2+ "extends" : " ../../tsconfig.base.json" ,
23 "files" : [" src/migrate-config-cli.js" ],
34 "compilerOptions" : {
4- "declaration" : true ,
5- "emitDeclarationOnly" : true ,
6- "allowJs" : true ,
7- "checkJs" : true ,
8- "outDir" : " dist/esm" ,
9- "target" : " ES2022" ,
10- "moduleResolution" : " NodeNext" ,
11- "module" : " NodeNext"
5+ "outDir" : " dist/esm"
126 }
137}
Original file line number Diff line number Diff line change 11{
2+ "extends" : " ../../tsconfig.base.json" ,
23 "files" : [" src/index.js" ],
34 "compilerOptions" : {
4- "declaration" : true ,
5- "emitDeclarationOnly" : true ,
6- "allowJs" : true ,
7- "checkJs" : true ,
8- "outDir" : " dist/esm" ,
9- "target" : " ES2022" ,
10- "moduleResolution" : " NodeNext" ,
11- "module" : " NodeNext"
5+ "outDir" : " dist/esm"
126 }
137}
Original file line number Diff line number Diff line change 4747 "license" : " Apache-2.0" ,
4848 "devDependencies" : {
4949 "@eslint/core" : " ^0.9.0" ,
50+ "@types/levn" : " ^0.4.0" ,
5051 "c8" : " ^9.1.0" ,
5152 "mocha" : " ^10.4.0" ,
5253 "rollup" : " ^4.16.2" ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 99// Imports
1010//------------------------------------------------------------------------------
1111
12- // @ts -ignore -- don't feel like fighting with TypeScript right now
1312import levn from "levn" ;
1413
1514//-----------------------------------------------------------------------------
@@ -125,7 +124,8 @@ export class ConfigCommentParser {
125124 parseJSONLikeConfig ( string ) {
126125 // Parses a JSON-like comment by the same way as parsing CLI option.
127126 try {
128- const items = levn . parse ( "Object" , string ) || { } ;
127+ const items =
128+ /** @type {RulesConfig } */ ( levn . parse ( "Object" , string ) ) || { } ;
129129
130130 /*
131131 * When the configuration has any invalid severities, it should be completely
You can’t perform that action at this time.
0 commit comments