-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ops): add standard-linter (#4)
- Loading branch information
Showing
5 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
Linter | ||
--- | ||
|
||
`@ordzaar/standard-linter` | ||
|
||
Standard linter for TS projects that do not run with web frameworks. This module also installs `prettier`, `eslint`, `husky` and `lint-staged`. | ||
|
||
Lint rules are extended from these packages | ||
|
||
| Package | Description | | ||
| -------------------------------- | ----------------------------------------------------- | | ||
| @typescript-eslint/parser | Rules parser for TypeScript. | | ||
| eslint-config-airbnb-base | Rules defined by airbnb. | | ||
| eslint-config-airbnb-typescript | Rules defined by airbnb for TypeScript without React. | | ||
| eslint-plugin-simple-import-sort | Rules defined for simple import sorting. | | ||
| prettier | Rules defined by prettier to have same code styles | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
module.exports = { | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"airbnb", | ||
"airbnb-typescript/base", | ||
"prettier", | ||
], | ||
plugins: ["simple-import-sort", "prettier"], | ||
parser: "@typescript-eslint/parser", | ||
rules: { | ||
"@typescript-eslint/no-floating-promises": "error", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
argsIgnorePattern: "^_", | ||
varsIgnorePattern: "^_", | ||
caughtErrorsIgnorePattern: "^_", | ||
}, | ||
], | ||
"sort-imports": "off", | ||
"import/order": "off", | ||
"simple-import-sort/imports": "error", | ||
"simple-import-sort/exports": "error", | ||
}, | ||
overrides: [ | ||
{ | ||
files: ["**/**.{test,spec,unit}.{js,ts}"], | ||
rules: { | ||
"@typescript-eslint/no-floating-promises": "off", | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "@ordzaar/standard-linter", | ||
"version": "0.0.0", | ||
"main": "index.js", | ||
"files": [ | ||
"index.js" | ||
], | ||
"dependencies": { | ||
"@typescript-eslint/eslint-plugin": "^6.9.1", | ||
"@typescript-eslint/parser": "^6.9.1", | ||
"eslint": "^8.52.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-config-airbnb-typescript": "^17.1.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-prettier": "^5.0.1", | ||
"eslint-plugin-simple-import-sort": "^10.0.0", | ||
"husky": "^8.0.3", | ||
"lint-staged": "^15.0.2", | ||
"prettier": "^3.0.3", | ||
"typescript": "^5.2.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.