Add eslint rules.
parent
3b54472115
commit
49ae70d3c3
|
@ -0,0 +1,20 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
parser: "@typescript-eslint/parser",
|
||||
plugins: [
|
||||
"@typescript-eslint",
|
||||
],
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
],
|
||||
globals: {
|
||||
"console": "readonly"
|
||||
},
|
||||
rules: {
|
||||
"@typescript-eslint/explicit-function-return-type": "off",
|
||||
"no-undef": "warn",
|
||||
"no-console": "off",
|
||||
"semi": ['error', 'always']
|
||||
},
|
||||
};
|
12
README.md
12
README.md
|
@ -18,7 +18,7 @@
|
|||
|
||||
- [x] TypeScript
|
||||
- [x] Webpack
|
||||
- [ ] Eslint
|
||||
- [x] Eslint
|
||||
|
||||
---
|
||||
|
||||
|
@ -30,7 +30,7 @@ Supported features:
|
|||
|
||||
- [x] TypeScript
|
||||
- [x] Webpack
|
||||
- [ ] Eslint
|
||||
- [x] Eslint
|
||||
|
||||
---
|
||||
|
||||
|
@ -42,7 +42,7 @@ Supported features:
|
|||
|
||||
- [x] TypeScript
|
||||
- [x] Webpack
|
||||
- [ ] Eslint
|
||||
- [x] Eslint
|
||||
|
||||
---
|
||||
|
||||
|
@ -54,7 +54,7 @@ Funcionalidades soportadas:
|
|||
|
||||
- [x] TypeScript
|
||||
- [x] Webpack
|
||||
- [ ] Eslint
|
||||
- [x] Eslint
|
||||
|
||||
---
|
||||
|
||||
|
@ -66,7 +66,7 @@ Fonctionnalités prises en charge :
|
|||
|
||||
- [x] TypeScript
|
||||
- [x] Webpack
|
||||
- [ ] Eslint
|
||||
- [x] Eslint
|
||||
|
||||
---
|
||||
|
||||
|
@ -78,4 +78,4 @@ Unterstützte Funktionen:
|
|||
|
||||
- [x] TypeScript
|
||||
- [x] Webpack
|
||||
- [ ] Eslint
|
||||
- [x] Eslint
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -5,11 +5,15 @@
|
|||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "webpack"
|
||||
"build": "webpack",
|
||||
"lint": "eslint src"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^5.55.0",
|
||||
"@typescript-eslint/parser": "^5.55.0",
|
||||
"eslint": "^8.36.0",
|
||||
"ts-loader": "^9.4.2",
|
||||
"typescript": "^4.9.5",
|
||||
"webpack": "^5.76.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class Roy {
|
||||
name: string
|
||||
age: number
|
||||
name: string;
|
||||
age: number;
|
||||
|
||||
constructor(name: string, age: number) {
|
||||
this.name = name;
|
||||
|
@ -8,8 +8,8 @@ class Roy {
|
|||
}
|
||||
|
||||
play = () => {
|
||||
console.log(`Hi, I am ${this.name}, I am ${this.age} years old`)
|
||||
}
|
||||
console.log(`Hi, I am ${this.name}, I am ${this.age} years old`);
|
||||
};
|
||||
}
|
||||
|
||||
const roy = new Roy("Roy", 57);
|
||||
|
|
Loading…
Reference in New Issue