eslint 설정

This commit is contained in:
2021-08-11 02:07:41 +09:00
parent 8c9bf93dca
commit e5b5c5e1cf
2 changed files with 28 additions and 1 deletions
+22
View File
@@ -0,0 +1,22 @@
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
"project": "./tsconfig.json"
},
ignorePatterns: ['*.test.ts', '.eslintrc.js', 'webpack.config.js', '*.js'],
overrides: [{
files: ['*.ts', '*.tsx'],
}],
plugins: [
"@typescript-eslint",
],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
rules: {
'@typescript-eslint/no-floating-promises': 'error',
}
}
+6 -1
View File
@@ -5,7 +5,8 @@
"main": "js/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack"
"build": "webpack",
"lint": "eslint hwe/ts ts"
},
"repository": {
"type": "git",
@@ -22,14 +23,18 @@
"@babel/core": "^7.15.0",
"@babel/preset-env": "^7.15.0",
"@babel/preset-typescript": "^7.15.0",
"@typescript-eslint/eslint-plugin": "^4.29.1",
"@typescript-eslint/parser": "^4.29.1",
"babel-loader": "^8.2.2",
"babel-plugin-lodash": "^3.3.4",
"eslint": "^7.32.0",
"pre-commit": "^1.2.2",
"typescript": "^4.3.5",
"webpack": "^5.49.0",
"webpack-cli": "^4.7.2"
},
"pre-commit": [
"lint",
"build"
]
}