-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use
typescript-eslint
and eslint-plugin-expect-type
instead of `d…
…tslint`, `tslint`
- Loading branch information
1 parent
a70e203
commit fe09685
Showing
14 changed files
with
69 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"rules": { | ||
"@definitelytyped/no-any-union": "off", | ||
"@definitelytyped/no-unnecessary-generics": "off", | ||
"@typescript-eslint/no-empty-interface": "off", | ||
"@typescript-eslint/no-misused-new": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// @ts-check | ||
import tseslint, { parser } from 'typescript-eslint'; | ||
import expectType from "eslint-plugin-expect-type/configs/recommended"; | ||
|
||
export const sharedOpts = tseslint.config( | ||
tseslint.configs.base, | ||
expectType, | ||
// global ignore | ||
{ ignores: ["build/*", "eslint.config.*"], }, | ||
); | ||
|
||
export default tseslint.config( | ||
...sharedOpts, | ||
{ files: ['src/**/*.ts', 'dist/screeps-tests.ts'], }, | ||
{ | ||
languageOptions: { | ||
ecmaVersion: 2022, | ||
sourceType: "module", | ||
parserOptions: { | ||
parser: parser, | ||
project: ["./tsconfig.json", './dist/tsconfig.json'], | ||
}, | ||
}, | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// @ts-check | ||
// only used for 'dist/screeps-tests.ts' | ||
import tseslint, { parser } from 'typescript-eslint'; | ||
import { sharedOpts } from "./eslint.config.mjs"; | ||
|
||
export default tseslint.config( | ||
...sharedOpts, | ||
{ files: ['dist/screeps-tests.ts'], }, | ||
{ | ||
languageOptions: { | ||
ecmaVersion: 2022, | ||
sourceType: "module", | ||
parserOptions: { | ||
parser: parser, | ||
project: ['./dist/tsconfig.json'], | ||
}, | ||
}, | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,17 +8,14 @@ | |
"dist/index.d.ts" | ||
], | ||
"scripts": { | ||
"compile:dtslint": "node ./build/concat.js && node ./build/prependHeader.js", | ||
"compile": "npm run compile:dtslint && node ./build/prependDescription.js", | ||
"dtslint": "npm run compile:dtslint && dtslint dist", | ||
"compile": "node ./build/concat.js && node ./build/prependHeader.js && node ./build/prependDescription.js", | ||
"format": "npm run format:build && npm run format:src", | ||
"format:build": "prettier --write 'build/**/*.js'", | ||
"format:src": "prettier --write 'src/**/*.ts'", | ||
"lint": "tslint -p tsconfig.json 'src/**/*.ts'", | ||
"lint:test": "tslint -p dist/tsconfig.json dist/screeps-tests.ts", | ||
"lint": "eslint -c eslint.config.mjs", | ||
"lint:test": "eslint -c eslint.config.test.mjs dist/screeps-tests.ts", | ||
"pre-commit": "npm run compile && git add dist/index.d.ts", | ||
"prepare": "husky install && npm test", | ||
"test": "npm run dtslint" | ||
"prepare": "husky install && npm test" | ||
}, | ||
"keywords": [ | ||
"Screeps", | ||
|
@@ -29,15 +26,13 @@ | |
"author": "Marko Sulamagi <[email protected]>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@definitelytyped/dtslint": "^0.0.111", | ||
"eslint": "^9.7.0", | ||
"husky": "^7.0.4", | ||
"lint-staged": "^12.3.8", | ||
"prepend": "^1.0.2", | ||
"prettier": "^2.6.2", | ||
"tslint": "^6.1.3", | ||
"tslint-config-prettier": "^1.18.0", | ||
"tslint-plugin-prettier": "^2.3.0", | ||
"typescript": "^5.5.0" | ||
"typescript": "^5.5.0", | ||
"typescript-eslint": "^7.16.1" | ||
}, | ||
"lint-staged": { | ||
"*.{ts,tsx}": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.