-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
118 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
import stefanobartoletti from './index.js' | ||
import { stefanobartoletti } from './index.js' | ||
|
||
export default [ | ||
...stefanobartoletti, | ||
] | ||
export default stefanobartoletti() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,19 @@ | ||
import antfu from '@antfu/eslint-config' | ||
import antfuOptions from './rules/antfuOptions.js' | ||
import sbConfigBase from './rules/sbConfigBase.js' | ||
import sbConfigNuxt from './rules/sbConfigNuxt.js' | ||
|
||
const stefanobartoletti = antfu({ | ||
stylistic: true, | ||
vue: true, | ||
typescript: true, | ||
}) | ||
const stefanobartoletti = (...args) => { | ||
return antfu( | ||
antfuOptions, // This must be the first argument | ||
sbConfigBase, | ||
...args, | ||
) | ||
} | ||
|
||
stefanobartoletti.push({ | ||
// Vue rules | ||
files: ['**/*.vue'], | ||
rules: { | ||
'vue/max-attributes-per-line': ['error', { | ||
singleline: { max: 10 }, | ||
multiline: { max: 1 }, | ||
}], | ||
'vue/singleline-html-element-content-newline': 'off', | ||
'vue/html-self-closing': ['warn', { | ||
html: { | ||
void: 'always', | ||
normal: 'never', | ||
}, | ||
}], | ||
'vue/block-order': ['error', { | ||
order: ['template', 'script', 'style'], | ||
}], | ||
}, | ||
}) | ||
const nuxt = sbConfigNuxt | ||
|
||
stefanobartoletti.push({ | ||
// General rules | ||
rules: { | ||
'curly': ['error', 'all'], | ||
'style/function-call-spacing': ['error', 'never'], | ||
'node/prefer-global/process': 'off', | ||
'antfu/top-level-function': 'off', | ||
}, | ||
}) | ||
|
||
export default stefanobartoletti | ||
export { | ||
stefanobartoletti, | ||
nuxt, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const antfuOptions = { | ||
stylistic: true, | ||
vue: true, | ||
typescript: true, | ||
} | ||
|
||
export default antfuOptions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
const sbConfigBase = [ | ||
|
||
// Vue Rules | ||
{ | ||
files: ['**/*.vue'], | ||
rules: { | ||
'vue/max-attributes-per-line': ['error', { | ||
singleline: { max: 10 }, | ||
multiline: { max: 1 }, | ||
}], | ||
'vue/singleline-html-element-content-newline': 'off', | ||
'vue/html-self-closing': ['warn', { | ||
html: { | ||
void: 'always', | ||
normal: 'never', | ||
}, | ||
}], | ||
'vue/block-order': ['error', { | ||
order: ['template', 'script', 'style'], | ||
}], | ||
}, | ||
}, | ||
|
||
// General Rules | ||
{ | ||
rules: { | ||
'curly': ['error', 'all'], | ||
'style/function-call-spacing': ['error', 'never'], | ||
'node/prefer-global/process': 'off', | ||
'antfu/top-level-function': 'off', | ||
}, | ||
}, | ||
] | ||
|
||
export default sbConfigBase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// https://github.com/nuxt/eslint-config/blob/main/packages/eslint-config/index.js | ||
|
||
const sbConfigNuxt = [ | ||
|
||
// Components Rules | ||
{ | ||
files: ['**/components/**/*.{js,ts,jsx,tsx,vue}'], | ||
rules: { | ||
// Components should have multiple word names. | ||
// Pages, layouts, app.* and error.* not included as they can have single word names | ||
'vue/multi-word-component-names': 'warn', | ||
}, | ||
}, | ||
|
||
// Composables Rules | ||
{ | ||
files: ['**/composables/**/*.{js,ts,jsx,tsx,vue}'], | ||
rules: { | ||
// Composables can use auto-imports, eslint should not throw an error for undefined | ||
'no-undef': 'off', | ||
}, | ||
}, | ||
|
||
// Pages and Layouts Rules | ||
{ | ||
files: ['**/{pages,layouts}/**/*.{js,ts,jsx,tsx,vue}'], | ||
rules: { | ||
// Pages and layouts are required to have a single root element if transitions are enabled. | ||
'vue/no-multiple-template-root': 'error', | ||
}, | ||
}, | ||
] | ||
|
||
export default sbConfigNuxt |