Skip to content

Commit

Permalink
feat: enable antfu/consistent-object-newline
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 22, 2023
1 parent db397b6 commit e3b3ace
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -36,7 +36,7 @@
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
"eslint-define-config": "^1.23.0",
"eslint-plugin-antfu": "^1.0.0-beta.2",
"eslint-plugin-antfu": "^1.0.0-beta.3",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-i": "^2.28.1",
"eslint-plugin-jsdoc": "^46.8.2",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/configs/stylistic.ts
Expand Up @@ -12,6 +12,8 @@ export const javascriptStylistic: FlatESLintConfigItem[] = [
},
rules: {
'antfu/if-newline': 'error',
'antfu/consistent-object-newline': 'error',

'comma-dangle': ['error', 'always-multiline'],
'curly': ['error', 'multi-or-nest', 'consistent'],
'quotes': ['error', 'single'],
Expand Down Expand Up @@ -75,7 +77,7 @@ export const javascriptStylistic: FlatESLintConfigItem[] = [
'style/no-tabs': 'error',
'style/no-trailing-spaces': 'error',
'style/no-whitespace-before-property': 'error',
'style/object-curly-newline': ['error', { consistent: true, multiline: true }],
'style/object-curly-newline': OFF,
'style/object-curly-spacing': ['error', 'always'],
'style/object-property-newline': ['error', { allowMultiplePropertiesPerLine: true }],
'style/operator-linebreak': ['error', 'before'],
Expand Down
3 changes: 1 addition & 2 deletions src/configs/vue.ts
Expand Up @@ -80,8 +80,7 @@ export function vue(options: OptionsHasTypeScript = {}): FlatESLintConfigItem[]
'vue/no-unused-refs': 'error',
'vue/no-useless-v-bind': 'error',
'vue/no-v-html': OFF,
'vue/no-v-text-v-html-on-component': OFF,
'vue/object-curly-newline': ['error', { consistent: true, multiline: true }],
'vue/object-curly-newline': OFF,
'vue/object-curly-spacing': ['error', 'always'],
'vue/object-property-newline': ['error', { allowMultiplePropertiesPerLine: true }],
'vue/object-shorthand': [
Expand Down

0 comments on commit e3b3ace

Please sign in to comment.