Skip to content

Commit 646003a

Browse files
committed
chre: lint fixes
1 parent 11f883a commit 646003a

7 files changed

+134
-126
lines changed

.eslintrc.js

+28-23
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ module.exports = {
33
plugins: ['prettier', '@typescript-eslint'],
44
parser: '@typescript-eslint/parser',
55
parserOptions: {
6-
createDefaultProgram: true,
7-
project: './tsconfig.json',
6+
ecmaVersion: 2018,
7+
sourceType: 'module',
8+
parser: '@typescript-eslint/parser',
9+
project: 'tsconfig.eslint.json',
10+
extraFileExtensions: ['.vue'],
11+
warnOnUnsupportedTypeScriptVersion: false,
12+
tsconfigRootDir: __dirname
813
},
914
rules: {
1015
'prettier/prettier': 'warn',
@@ -18,21 +23,21 @@ module.exports = {
1823
'@typescript-eslint/explicit-member-accessibility': [
1924
'off',
2025
{
21-
accessibility: 'explicit',
22-
},
26+
accessibility: 'explicit'
27+
}
2328
],
2429
'@typescript-eslint/indent': [
2530
'error',
2631
4,
2732
{
2833
FunctionDeclaration: {
29-
parameters: 'first',
34+
parameters: 'first'
3035
},
3136
FunctionExpression: {
32-
parameters: 'first',
37+
parameters: 'first'
3338
},
34-
SwitchCase: 1,
35-
},
39+
SwitchCase: 1
40+
}
3641
],
3742
'@typescript-eslint/interface-name-prefix': 'off',
3843
'@typescript-eslint/member-delimiter-style': 'error',
@@ -57,8 +62,8 @@ module.exports = {
5762
'error',
5863
'single',
5964
{
60-
avoidEscape: true,
61-
},
65+
avoidEscape: true
66+
}
6267
],
6368
'@typescript-eslint/semi': ['error'],
6469
'@typescript-eslint/space-within-parens': ['off', 'never'],
@@ -84,17 +89,17 @@ module.exports = {
8489
ignoreCase: false,
8590
ignoreDeclarationSort: true,
8691
ignoreMemberSort: false,
87-
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
88-
},
92+
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single']
93+
}
8994
],
9095
'linebreak-style': 'off',
9196
'max-classes-per-file': 'off',
9297
'max-len': [
9398
'off',
9499
{
95100
ignorePattern: '^import |^export {(.*?)}',
96-
code: 200,
97-
},
101+
code: 200
102+
}
98103
],
99104
'new-parens': 'off',
100105
'newline-per-chained-call': 'off',
@@ -124,9 +129,9 @@ module.exports = {
124129
'profile',
125130
'profileEnd',
126131
'timeStamp',
127-
'context',
128-
],
129-
},
132+
'context'
133+
]
134+
}
130135
],
131136
'no-constant-condition': 'error',
132137
'no-control-regex': 'off',
@@ -147,8 +152,8 @@ module.exports = {
147152
'no-shadow': [
148153
'off',
149154
{
150-
hoist: 'all',
151-
},
155+
hoist: 'all'
156+
}
152157
],
153158
'no-throw-literal': 'error',
154159
'no-trailing-spaces': 'error',
@@ -159,8 +164,8 @@ module.exports = {
159164
'error',
160165
{
161166
allowTaggedTemplates: true,
162-
allowShortCircuit: true,
163-
},
167+
allowShortCircuit: true
168+
}
164169
],
165170
'no-unused-labels': 'error',
166171
'no-var': 'error',
@@ -172,6 +177,6 @@ module.exports = {
172177
radix: 'error',
173178
'space-before-function-paren': 'off',
174179
'use-isnan': 'error',
175-
'valid-typeof': 'off',
176-
},
180+
'valid-typeof': 'off'
181+
}
177182
};

.prettierrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"printWidth": 200,
33
"semi": true,
44
"tabWidth": 4,
5-
"singleQuote": true
5+
"singleQuote": true,
6+
"trailingComma": "none"
67
}

src/layers/parser/property-parser.ios.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const keysMap = {
3939
'raster-hue-rotate': 'rasterHueRotation',
4040
'raster-resampling': 'rasterResamplingMode',
4141
'raster-brightness-min': 'maximumRasterBrightness',
42-
'raster-brightness-max': 'minimumRasterBrightness',
42+
'raster-brightness-max': 'minimumRasterBrightness'
4343
};
4444
function transformValue(key, value) {
4545
if (key.indexOf('-color') !== -1 && !Array.isArray(value)) {

0 commit comments

Comments
 (0)