Skip to content

Commit b60e3d5

Browse files
committed
chore: lint code
1 parent 5ac656e commit b60e3d5

File tree

5 files changed

+22
-14
lines changed

5 files changed

+22
-14
lines changed

.vscode/settings.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
{
2-
"cSpell.words": ["bumpp", "coderwyd", "taze"]
2+
"cSpell.words": ["bumpp", "coderwyd", "taze"],
3+
"prettier.enable": false,
4+
"editor.formatOnSave": false,
5+
"editor.codeActionsOnSave": {
6+
"source.fixAll.eslint": true,
7+
"source.organizeImports": false
8+
},
9+
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "html", "markdown", "json", "jsonc", "yaml"]
310
}

packages/eslint-config-basic/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ module.exports = {
202202
'import/no-self-import': 'error',
203203

204204
// Common
205-
semi: ['error', 'never'],
206-
curly: ['error', 'multi-or-nest', 'consistent'],
207-
quotes: ['error', 'single'],
205+
'semi': ['error', 'never'],
206+
'curly': ['error', 'multi-or-nest', 'consistent'],
207+
'quotes': ['error', 'single'],
208208
'quote-props': ['error', 'consistent-as-needed'],
209209

210210
'unused-imports/no-unused-imports': 'error',
@@ -214,7 +214,7 @@ module.exports = {
214214
'array-bracket-spacing': ['error', 'never'],
215215
'brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
216216
'block-spacing': ['error', 'always'],
217-
camelcase: 'off',
217+
'camelcase': 'off',
218218
'comma-spacing': ['error', { before: false, after: true }],
219219
'comma-style': ['error', 'last'],
220220
'comma-dangle': ['error', 'always-multiline'],
@@ -224,7 +224,7 @@ module.exports = {
224224
'no-cond-assign': ['error', 'always'],
225225
'func-call-spacing': 'off',
226226
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
227-
indent: ['error', 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1 }],
227+
'indent': ['error', 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1 }],
228228
'no-restricted-syntax': ['error', 'DebuggerStatement', 'LabeledStatement', 'WithStatement'],
229229
'object-curly-spacing': ['error', 'always'],
230230
'no-return-await': 'off',
@@ -297,8 +297,8 @@ module.exports = {
297297
'array-callback-return': 'error',
298298
'block-scoped-var': 'error',
299299
'consistent-return': 'off',
300-
complexity: 'off',
301-
eqeqeq: ['error', 'smart'],
300+
'complexity': 'off',
301+
'eqeqeq': ['error', 'smart'],
302302
'no-alert': 'warn',
303303
'no-case-declarations': 'error',
304304
'no-multi-spaces': 'error',

packages/eslint-config-ts/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ module.exports = {
5959
'jest/unbound-method': 'error',
6060
},
6161
},
62-
]
62+
],
6363
),
6464
rules: {
6565
'import/named': 'off',
@@ -74,7 +74,7 @@ module.exports = {
7474
'@typescript-eslint/no-require-imports': 'error',
7575
// Override JS
7676
'no-useless-constructor': 'off',
77-
indent: 'off',
77+
'indent': 'off',
7878
'@typescript-eslint/indent': [
7979
'error',
8080
2,
@@ -129,9 +129,9 @@ module.exports = {
129129
'@typescript-eslint/comma-dangle': ['error', 'always-multiline'],
130130
'object-curly-spacing': 'off',
131131
'@typescript-eslint/object-curly-spacing': ['error', 'always'],
132-
semi: 'off',
132+
'semi': 'off',
133133
'@typescript-eslint/semi': ['error', 'never'],
134-
quotes: 'off',
134+
'quotes': 'off',
135135
'@typescript-eslint/quotes': ['error', 'single'],
136136
'space-before-blocks': 'off',
137137
'@typescript-eslint/space-before-blocks': ['error', 'always'],

packages/eslint-config-vue/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ const { isPackageExists } = require('local-pkg')
22

33
const TS = isPackageExists('typescript')
44

5-
if (!TS) console.warn('[@coderwyd/eslint-config] TypeScript is not installed, fallback to JS only.')
5+
if (!TS)
6+
console.warn('[@coderwyd/eslint-config] TypeScript is not installed, fallback to JS only.')
67

78
module.exports = {
89
overrides: [

packages/eslint-plugin-coderwyd/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "eslint-plugin-coderwyd",
33
"version": "1.0.2",
4-
"license": "MIT",
54
"author": "Donny Wang <donny526@outlook.com> (https://github.com/coderwyd/)",
5+
"license": "MIT",
66
"homepage": "https://github.com/coderwyd/eslint-config",
77
"main": "./dist/index.cjs",
88
"module": "./dist/index.mjs",

0 commit comments

Comments
 (0)