Skip to content

upgrade eslint and fix tsconfig.lib #167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ module.exports = {
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:prettier/recommended",
"prettier/@typescript-eslint",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript"
"plugin:import/typescript",
"prettier",
],
parser: "@typescript-eslint/parser",
parserOptions: {
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.17.0
19 changes: 7 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
"url": "https://github.com/screepers/screeps-typescript-starter/issues"
},
"homepage": "https://github.com/screepers/screeps-typescript-starter#readme",
"engines": {
"node": "10.x || 12.x"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^20.0.0",
"@rollup/plugin-node-resolve": "^13.0.4",
Expand All @@ -42,18 +39,16 @@
"@types/screeps": "^3.2.3",
"@types/sinon": "^5.0.5",
"@types/sinon-chai": "^3.2.0",
"@typescript-eslint/eslint-plugin": "^4.29.1",
"@typescript-eslint/parser": "^4.29.1",
"@typescript-eslint/typescript-estree": "^4.29.1",
"@typescript-eslint/eslint-plugin": "^5.38.1",
"@typescript-eslint/parser": "^5.38.1",
"chai": "^4.2.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-typescript": "^2.4.0",
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^3.5.1",
"eslint-plugin-import": "^2.24.0",
"eslint-plugin-prettier": "^3.4.0",
"lodash": "^3.10.1",
"mocha": "^5.2.0",
"prettier": "^2.3.2",
"prettier": "^2.7.1",
"rollup": "^2.56.2",
"rollup-plugin-clear": "^2.0.7",
"rollup-plugin-screeps": "^1.0.1",
Expand All @@ -62,7 +57,7 @@
"sinon-chai": "^3.2.0",
"ts-node": "^10.2.0",
"tsconfig-paths": "^3.10.1",
"typescript": "^4.3.5"
"typescript": "^4.8.4"
},
"dependencies": {
"source-map": "~0.6.1"
Expand Down
10 changes: 4 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ declare global {
working: boolean;
}

// Syntax for adding proprties to `global` (ex "global.log")
namespace NodeJS {
interface Global {
log: any;
}
}
}
// Syntax for adding proprties to `global` (ex "global.log")
declare const global: {
log: any;
}

// When compiling TS to JS and bundling with rollup, the line numbers and file names in error messages change
Expand Down
1 change: 1 addition & 0 deletions src/utils/ErrorMapper.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable */
import { SourceMapConsumer } from "source-map";

export class ErrorMapper {
Expand Down
4 changes: 1 addition & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@
"allowSyntheticDefaultImports": true,
"allowUnreachableCode": false
},
"exclude": [
"node_modules"
]
"exclude": ["node_modules"]
}