Skip to content

Commit 752fa16

Browse files
committed
add eslint config file to firestore
1 parent 6b8d34b commit 752fa16

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

config/.eslintrc.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
],
1212
"parserOptions": {
1313
"ecmaVersion": 2018,
14-
"sourceType": "module"
14+
"sourceType": "module",
15+
"project": "packages/firestore/tsconfig.json"
1516
},
1617
"overrides": [
1718
{
@@ -82,14 +83,9 @@
8283
"id-blacklist": [
8384
"error",
8485
"any",
85-
"Number",
8686
"number",
87-
"String",
8887
"string",
89-
"Boolean",
90-
"boolean",
91-
"Undefined",
92-
"undefined"
88+
"boolean"
9389
],
9490
"@typescript-eslint/array-type": [
9591
"error",

packages/firestore/.eslintrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../../config/.eslintrc.json",
3+
"parserOptions": {
4+
"project": "tsconfig.json"
5+
}
6+
}

packages/firestore/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"build:console": "node tools/console.build.js",
99
"dev": "rollup -c -w",
1010
"lint": "tslint -p tsconfig.json -c tslint.json 'src/**/*.ts' 'test/**/*.ts'",
11+
"lint:eslint": "eslint -c .eslintrc.json '**/*.ts'",
1112
"lint:fix": "tslint --fix -p tsconfig.json -c tslint.json 'src/**/*.ts' 'test/**/*.ts'",
1213
"prettier": "prettier --write 'src/**/*.js' 'test/**/*.js' 'src/**/*.ts' 'test/**/*.ts'",
1314
"test": "run-s lint test:all",
@@ -76,7 +77,11 @@
7677
"tslint": "5.16.0",
7778
"typescript": "3.4.5",
7879
"webpack": "4.30.0",
79-
"yargs": "13.2.2"
80+
"yargs": "13.2.2",
81+
"eslint": "5.16.0",
82+
"@typescript-eslint/parser": "1.9.0",
83+
"@typescript-eslint/eslint-plugin": "1.9.0",
84+
"@typescript-eslint/eslint-plugin-tslint": "1.9.0"
8085
},
8186
"repository": {
8287
"directory": "packages/firestore",

0 commit comments

Comments
 (0)