@subframe7536/eslint-config
v0.9.7
Published
eslint config extends @antfu
Downloads
204
Readme
@subframe7536/eslint-config
self use eslint config, extends antfu's config
difference
- prefer curly everywhere
- prefer global
Buffer
,process
- ignores can start with
./
- loose some rules
- ignore
solid/reactivity
inwatch()
type: 'lib'
by default
setup
in eslint.config.js
import { GLOB_MARKDOWN_CODE, defineEslintConfig } from '@subframe7536/eslint-config'
export default defineEslintConfig({
solid: true,
type: 'app',
ignoreAll: './dev/**.*',
ignoreRulesOnFiles: {
files: [GLOB_MARKDOWN_CODE],
rules: ['ts/explicit-function-return-type'],
},
overrideRules: {
'node/prefer-global/buffer': ['error', 'always'],
},
})
types:
import type { OptionsConfig, TypedFlatConfigItem } from '@antfu/eslint-config'
type Options = Omit<OptionsConfig, 'overrides'> & {
/**
* Enable Solid-js rules
*/
solid?: boolean
/**
* Ignore files
*/
ignores?: string | string[]
/**
* Override all rules
*/
overrideRules?: TypedFlatConfigItem['rules']
}
in .vscode/settings.json
{
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,
// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml"
]
}