Skip to content

Commit 1b5ef43

Browse files
committed
update lint,prettier , partial schema
1 parent efba716 commit 1b5ef43

File tree

4 files changed

+219
-70
lines changed

4 files changed

+219
-70
lines changed

.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
node_modules
3+
data
4+
src/types

.eslintrc

+23-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
{
22
"parser": "@typescript-eslint/parser",
3-
"parserOptions": {
4-
"project": ["./tsconfig.json"]
5-
},
6-
"extends": ["oceanprotocol", "plugin:prettier/recommended"],
7-
"plugins": ["@typescript-eslint"],
3+
"root": true,
4+
"extends": [
5+
"eslint:recommended",
6+
"plugin:@typescript-eslint/recommended"
7+
],
8+
"plugins": [
9+
"@typescript-eslint"
10+
],
811
"rules": {
9-
"no-use-before-define": "off",
10-
"eqeqeq": "off",
11-
"@typescript-eslint/no-use-before-define": "error",
12-
"no-undef": ["warn"]
12+
"comma-spacing": [
13+
"error",
14+
{
15+
"before": false,
16+
"after": true
17+
}
18+
],
19+
"prefer-const": [
20+
"off"
21+
],
22+
"prettier/prettier": "error",
23+
"mocha-no-only/mocha-no-only": [
24+
"error"
25+
],
1326
}
14-
}
27+
}

.prettierrc

+30-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
{
2-
"semi": false,
3-
"singleQuote": true,
4-
"trailingComma": "none",
5-
"tabWidth": 2
6-
}
2+
"overrides": [
3+
{
4+
"files": "*.sol",
5+
"options": {
6+
"bracketSpacing": true,
7+
"explicitTypes": "always",
8+
"printWidth": 120,
9+
"singleQuote": false,
10+
"tabWidth": 4,
11+
"useTabs": false
12+
}
13+
},
14+
{
15+
"files": "*.ts",
16+
"options": {
17+
"bracketSpacing": true,
18+
"explicitTypes": "always",
19+
"newline-before-return": true,
20+
"no-duplicate-variable": [true, "check-parameters"],
21+
"no-var-keyword": true,
22+
"printWidth": 120,
23+
"semi": true,
24+
"singleQuote": true,
25+
"tabWidth": 2,
26+
"trailingComma": "es5",
27+
"useTabs": false
28+
}
29+
}
30+
]
31+
}

0 commit comments

Comments
 (0)