Skip to content

Commit 7ebcf05

Browse files
committed
chore: update
1 parent edd63e2 commit 7ebcf05

8 files changed

+347
-406
lines changed

.eslintignore

-22
This file was deleted.

.eslintrc.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ module.exports = {
66
extends: [
77
'eslint:recommended',
88
'plugin:@typescript-eslint/recommended',
9-
'prettier'
9+
'plugin:prettier/recommended'
1010
],
1111
parser: '@typescript-eslint/parser',
1212
parserOptions: {
13-
ecmaVersion: 12,
13+
ecmaVersion: 2020,
1414
sourceType: 'module',
1515
project: './tsconfig.eslint.json'
1616
},
17-
plugins: ['@typescript-eslint'],
1817
rules: {
1918
'no-unused-vars': 'off',
2019
'@typescript-eslint/no-unused-vars': [

.prettierignore

-6
This file was deleted.

.prettierrc.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ module.exports = {
33
tabWidth: 2,
44
semi: false,
55
singleQuote: true,
6-
printWidth: 80
6+
printWidth: 80,
7+
endOfLine: 'auto'
78
}

package.json

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
{
22
"main": "build/index.js",
33
"devDependencies": {
4-
"@types/node": "^14.14.17",
5-
"@typescript-eslint/eslint-plugin": "^4.8.1",
6-
"@typescript-eslint/parser": "^4.8.1",
7-
"eslint": "^7.13.0",
8-
"eslint-config-prettier": "^7.1.0",
9-
"prettier": "^2.1.2",
10-
"typescript": "^4.0.5"
4+
"@types/node": "^16.11.0",
5+
"@typescript-eslint/eslint-plugin": "^5.0.0",
6+
"@typescript-eslint/parser": "^5.0.0",
7+
"eslint": "^8.0.1",
8+
"eslint-config-prettier": "^8.3.0",
9+
"eslint-plugin-prettier": "^4.0.0",
10+
"prettier": "^2.4.1",
11+
"typescript": "^4.4.4"
1112
},
1213
"dependencies": {},
1314
"scripts": {
14-
"lint": "yarn eslint && yarn prettier --check .",
15-
"lint:fix": "yarn eslint --fix && yarn prettier --write .",
16-
"build": "yarn tsc",
17-
"build:watch": "yarn tsc --watch"
15+
"lint": "eslint --ignore-path .gitignore .",
16+
"lint:fix": "eslint --fix --ignore-path .gitignore .",
17+
"build": "tsc",
18+
"build:watch": "tsc --watch"
1819
}
1920
}

src/index.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
console.log('Hello world!')
1+
async function main() {
2+
console.log('Main')
3+
}
4+
5+
void main()

tsconfig.eslint.json

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
{
22
"extends": "./tsconfig.json",
3-
"include": [".eslintrc.js", ".prettierrc.js"]
4-
}
3+
"compilerOptions": {
4+
"noEmit": true
5+
},
6+
"include": [
7+
"src/**/*",
8+
".eslintrc.js",
9+
".prettierrc.js"
10+
]
11+
}

0 commit comments

Comments
 (0)