Skip to content

Commit

Permalink
Add eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
echang594 committed Oct 11, 2024
1 parent 35953a6 commit ab94489
Show file tree
Hide file tree
Showing 5 changed files with 1,732 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
extends:
- "eslint:recommended"
- "airbnb-typescript/base"
parserOptions:
project: './tsconfig.json'
env:
browser: true
node: true
jest: true
rules:
"@typescript-eslint/no-misused-promises":
- "error"
"@typescript-eslint/no-unused-vars":
- "error"
- argsIgnorePattern: "type|_*"
class-methods-use-this: "off"
consistent-return: off
func-names: "off"
global-require: "off"
import/no-cycle: "off"
import/prefer-default-export: "off"
import/extensions: "off"
import/no-extraneous-dependencies: "off"
max-classes-per-file: "off"
max-len:
- "error"
- code: 120
no-bitwise:
- "error"
- allow:
- "^"
no-param-reassign: "off"
no-unused-vars: "off"
object-curly-newline:
- "error"
- consistent: true
overrides:
- files:
- "tests/*.test.ts"
rules:
no-await-in-loop: "off"
ignorePatterns:
- "build/"
14 changes: 14 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always"
},
"files.exclude": {
"**/.git": true,
"**/build": true,
"**/node_modules": true
},
"files.trimTrailingWhitespace": true,
"prettier.singleQuote": true,
"prettier.trailingComma": "all",
"editor.tabSize": 2
}
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
console.log("Hello World!");
console.log('Hello World!');
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
"author": "Eric Chang <[email protected]>",
"dependencies": {},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"eslint": "^8.57.1",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-plugin-import": "^2.31.0",
"typescript": "^5.6.3"
}
}
Loading

0 comments on commit ab94489

Please sign in to comment.