Skip to content

Commit

Permalink
Add eslint configs
Browse files Browse the repository at this point in the history
  • Loading branch information
jacopen committed Jan 8, 2021
1 parent c79a38d commit b6ad2d8
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vscode
node_modules
out
35 changes: 35 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module.exports = {
root: true,
env: {
es6: true,
node: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaVersion: 2018,
tsconfigRootDir: __dirname,
project: ['./tsconfig.eslint.json']
},
plugins: [
'@typescript-eslint',
],
extends: [
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
rules: {
"prettier/prettier": [
"error",
{
trailingComma: "all",
endOfLine: "lf",
semi: false,
singleQuote: true,
printWidth: 80,
tabWidth: 2
}
]
},
};
11 changes: 11 additions & 0 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"include": [
"src/**/*.ts",
".eslintrc.js"
],
"exclude": [
"node_modules",
"dist"
]
}

0 comments on commit b6ad2d8

Please sign in to comment.