Skip to content

Commit e6d1d91

Browse files
committed
update from eslint
1 parent aa9e07a commit e6d1d91

File tree

4 files changed

+114
-84
lines changed

4 files changed

+114
-84
lines changed

.eslintrc

+33-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,36 @@
11
{
2+
"parser": "@typescript-eslint/parser",
3+
"extends": ["plugin:@typescript-eslint/recommended"],
4+
"parserOptions": {
5+
"ecmaVersion": 2018,
6+
"sourceType": "module"
7+
},
28
"rules": {
3-
"semi": ["error", "always"],
4-
"quotes": ["error", "single"]
9+
"semi": ["error", "always"],
10+
"quotes": ["error", "double"],
11+
"@typescript-eslint/explicit-function-return-type": "off",
12+
"@typescript-eslint/camelcase": "off",
13+
"@typescript-eslint/no-explicit-any": "off",
14+
"no-multiple-empty-lines": "error",
15+
"@typescript-eslint/no-inferrable-types": [
16+
"warn", {
17+
"ignoreParameters": true
18+
}
19+
],
20+
"@typescript-eslint/no-unused-vars": "warn",
21+
"@typescript-eslint/class-name-casing": "off"
522
},
6-
"extends": "eslint:recommended",
7-
"ignorePatterns": ["*.js"]
8-
}
23+
"ignorePatterns": ["src/TextHighlighter.js","lib/*","dist/*","archived"],
24+
"overrides": [
25+
{
26+
"files": [
27+
"**/__tests__/*.{j,t}s?(x)",
28+
"**/tests/**/*.spec.{j,t}s?(x)"
29+
],
30+
"env": {
31+
"jest": true
32+
}
33+
}
34+
]
35+
}
36+

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"test": "jest -c ./jest.config.ts --forceExit --verbose -i --no-cache --detectOpenHandles",
1313
"test:coverage": "jest --forceExit --coverage --verbose --detectOpenHandles",
1414
"test:watch": "jest --watchAll --detectOpenHandles",
15-
"lint": "eslint",
15+
"lint": "tsc --noEmit && eslint \"{src,client}/**/*.{js,ts}\"",
16+
"lint:fix": "tsc --noEmit && eslint \"{src,client}/**/*.{js,ts}\" --fix",
1617
"build": "tsc",
1718
"build:help": "tsc --help",
1819
"build:drawio": "tsc ./src/index.ts --moduleResolution node --outFile ./lib/single.js --module amd",

src/contants.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
export const CreateTable = "create table";
44

5-
export const AlterTable = "alter table "
5+
export const AlterTable = "alter table ";
66

7-
export const CONSTRAINT = "constraint"
7+
export const CONSTRAINT = "constraint";
88

9-
export const Primary_Key = "primary key"
9+
export const Primary_Key = "primary key";
1010

11-
export const Foreign_Key = "foreign key"
11+
export const Foreign_Key = "foreign key";
1212

1313
export const CONSTRAINT_Primary_Key = "constraint primary key";
1414

0 commit comments

Comments
 (0)