@hypernym/eslint-config
v3.6.7
Published
Hypernym's internal config for ESLint.
Downloads
96
Readme
Usage
Linting Commands
Add lint commands for manual linting (optional):
// package.json
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint --fix ."
}
}JavaScript Config
// eslint.config.js
import { defineConfig, jsConfig, ignoresConfig } from '@hypernym/eslint-config'
export default defineConfig([jsConfig, ignoresConfig])TypeScript Config
// eslint.config.js
import {
defineConfig,
jsConfig,
tsConfig,
ignoresConfig,
} from '@hypernym/eslint-config'
export default defineConfig([jsConfig, tsConfig, ignoresConfig])Svelte/SvelteKit Config
[!NOTE]
Install the required
Sveltedependencies before using:pnpm add -D eslint-plugin-svelte svelte-eslint-parserAlso, don't forget to add the
sveltelang key to theeslint.validatevscode setting:// .vscode/settings.json { "eslint.validate": ["javascript", "typescript", "svelte"] }
// eslint.config.js
import {
defineConfig,
jsConfig,
tsConfig,
ignoresConfig,
} from '@hypernym/eslint-config'
import { svelteConfig } from '@hypernym/eslint-config/svelte'
export default defineConfig([jsConfig, tsConfig, svelteConfig, ignoresConfig])Vue/Nuxt Config
[!NOTE]
Install the required
Vuedependencies before using:pnpm add -D eslint-plugin-vue vue-eslint-parserAlso, don't forget to add the
vuelang key to theeslint.validatevscode setting:// .vscode/settings.json { "eslint.validate": ["javascript", "typescript", "vue"] }
// eslint.config.js
import {
defineConfig,
jsConfig,
tsConfig,
ignoresConfig,
} from '@hypernym/eslint-config'
import { vueConfig } from '@hypernym/eslint-config/vue'
export default defineConfig([jsConfig, tsConfig, vueConfig, ignoresConfig])React/Next Config
[!NOTE]
Install the required
Reactdependencies before using:pnpm add -D eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-react-refreshAlso, don't forget to add the
reactlang keys to theeslint.validatevscode setting:// .vscode/settings.json { "eslint.validate": ["javascript", "typescript", "javascriptreact", "typescriptreact"] }
// eslint.config.js
import { defineConfig, ignoresConfig } from '@hypernym/eslint-config'
import { jsxConfig, tsxConfig } from '@hypernym/eslint-config/react'
export default defineConfig([jsxConfig, tsxConfig, ignoresConfig])Custom Setup
// eslint.config.js
import {
defineConfig,
globalIgnores,
jsConfig,
tsConfig,
ignores,
} from '@hypernym/eslint-config'
export default defineConfig([
jsConfig,
tsConfig,
{
files: tsConfig.files,
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ ignoreRestSiblings: true },
],
},
},
globalIgnores([...ignores, '**/dir/']),
])For more info on how to ignore files, see the official docs.
License
Developed in 🇭🇷 Croatia, © Hypernym Studio.
Released under the MIT license.
