Skip to content

Commit 2b87fd6

Browse files
authored
Merge pull request #167 from Jomik/upgrade
upgrade eslint and fix tsconfig.lib (fixing in the process some modern errors)
2 parents cd90f22 + f2f5224 commit 2b87fd6

File tree

6 files changed

+16
-24
lines changed

6 files changed

+16
-24
lines changed

.eslintrc.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ module.exports = {
88
"eslint:recommended",
99
"plugin:@typescript-eslint/recommended",
1010
"plugin:@typescript-eslint/recommended-requiring-type-checking",
11-
"plugin:prettier/recommended",
12-
"prettier/@typescript-eslint",
1311
"plugin:import/errors",
1412
"plugin:import/warnings",
15-
"plugin:import/typescript"
13+
"plugin:import/typescript",
14+
"prettier",
1615
],
1716
parser: "@typescript-eslint/parser",
1817
parserOptions: {

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16.17.0

package.json

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
"url": "https://github.com/screepers/screeps-typescript-starter/issues"
3030
},
3131
"homepage": "https://github.com/screepers/screeps-typescript-starter#readme",
32-
"engines": {
33-
"node": "10.x || 12.x"
34-
},
3532
"devDependencies": {
3633
"@rollup/plugin-commonjs": "^20.0.0",
3734
"@rollup/plugin-node-resolve": "^13.0.4",
@@ -42,18 +39,16 @@
4239
"@types/screeps": "^3.2.3",
4340
"@types/sinon": "^5.0.5",
4441
"@types/sinon-chai": "^3.2.0",
45-
"@typescript-eslint/eslint-plugin": "^4.29.1",
46-
"@typescript-eslint/parser": "^4.29.1",
47-
"@typescript-eslint/typescript-estree": "^4.29.1",
42+
"@typescript-eslint/eslint-plugin": "^5.38.1",
43+
"@typescript-eslint/parser": "^5.38.1",
4844
"chai": "^4.2.0",
49-
"eslint": "^7.32.0",
50-
"eslint-config-prettier": "^8.3.0",
51-
"eslint-import-resolver-typescript": "^2.4.0",
45+
"eslint": "^8.24.0",
46+
"eslint-config-prettier": "^8.5.0",
47+
"eslint-import-resolver-typescript": "^3.5.1",
5248
"eslint-plugin-import": "^2.24.0",
53-
"eslint-plugin-prettier": "^3.4.0",
5449
"lodash": "^3.10.1",
5550
"mocha": "^5.2.0",
56-
"prettier": "^2.3.2",
51+
"prettier": "^2.7.1",
5752
"rollup": "^2.56.2",
5853
"rollup-plugin-clear": "^2.0.7",
5954
"rollup-plugin-screeps": "^1.0.1",
@@ -62,7 +57,7 @@
6257
"sinon-chai": "^3.2.0",
6358
"ts-node": "^10.2.0",
6459
"tsconfig-paths": "^3.10.1",
65-
"typescript": "^4.3.5"
60+
"typescript": "^4.8.4"
6661
},
6762
"dependencies": {
6863
"source-map": "~0.6.1"

src/main.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ declare global {
2121
working: boolean;
2222
}
2323

24-
// Syntax for adding proprties to `global` (ex "global.log")
25-
namespace NodeJS {
26-
interface Global {
27-
log: any;
28-
}
29-
}
24+
}
25+
// Syntax for adding proprties to `global` (ex "global.log")
26+
declare const global: {
27+
log: any;
3028
}
3129

3230
// When compiling TS to JS and bundling with rollup, the line numbers and file names in error messages change

src/utils/ErrorMapper.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
import { SourceMapConsumer } from "source-map";
23

34
export class ErrorMapper {

tsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,5 @@
1313
"allowSyntheticDefaultImports": true,
1414
"allowUnreachableCode": false
1515
},
16-
"exclude": [
17-
"node_modules"
18-
]
16+
"exclude": ["node_modules"]
1917
}

0 commit comments

Comments
 (0)