https://github.com/hypernym-studio/eslint-config
Hypernym's internal config for ESLint.
https://github.com/hypernym-studio/eslint-config
config configuration eslint eslint-config esm presets shareable
Last synced: 19 days ago
JSON representation
Hypernym's internal config for ESLint.
- Host: GitHub
- URL: https://github.com/hypernym-studio/eslint-config
- Owner: hypernym-studio
- License: mit
- Created: 2023-06-29T14:58:23.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-24T13:51:52.000Z (10 months ago)
- Last Synced: 2024-12-28T19:02:38.086Z (9 months ago)
- Topics: config, configuration, eslint, eslint-config, esm, presets, shareable
- Language: TypeScript
- Homepage:
- Size: 289 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
- Codeowners: .github/codeowners
Awesome Lists containing this project
README
@hypernym/eslint-config
Hypernym's internal config for ESLint.
Repository
✦
Package
✦
Releases
✦
Discussions
pnpm add -D @hypernym/eslint-config
## Usage
### Linting Commands
Add `lint` commands for manual linting (optional):
```js
// package.json{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint --fix ."
}
}
```### JavaScript Config
```js
// eslint.config.mjsimport { defineConfig, jsConfig, ignoresConfig } from '@hypernym/eslint-config'
export default defineConfig([jsConfig, ignoresConfig])
```### TypeScript Config
```js
// eslint.config.mjsimport {
defineConfig,
jsConfig,
tsConfig,
ignoresConfig,
} from '@hypernym/eslint-config'export default defineConfig([jsConfig, tsConfig, ignoresConfig])
```### Svelte/SvelteKit Config
> [!NOTE]
>
> Install the required `Svelte` dependencies before using:
>
> ```sh
> pnpm add -D eslint-plugin-svelte svelte-eslint-parser
> ```
>
> Also, don't forget to add the `svelte` lang key to the `eslint.validate` vscode setting:
>
> ```js
> // .vscode/settings.json
>
> {
> "eslint.validate": ["javascript", "typescript", "svelte"]
> }
> ``````js
// eslint.config.mjsimport {
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 `Vue` dependencies before using:
>
> ```sh
> pnpm add -D eslint-plugin-vue vue-eslint-parser
> ```
>
> Also, don't forget to add the `vue` lang key to the `eslint.validate` vscode setting:
>
> ```js
> // .vscode/settings.json
>
> {
> "eslint.validate": ["javascript", "typescript", "vue"]
> }
> ``````js
// eslint.config.mjsimport {
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 `React` dependencies before using:
>
> ```sh
> pnpm add -D eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-react-refresh
> ```
>
> Also, don't forget to add the `react` lang keys to the `eslint.validate` vscode setting:
>
> ```js
> // .vscode/settings.json
>
> {
> "eslint.validate": ["javascript", "typescript", "javascriptreact", "typescriptreact"]
> }
> ``````js
// eslint.config.mjsimport { defineConfig, ignoresConfig } from '@hypernym/eslint-config'
import { jsxConfig, tsxConfig } from '@hypernym/eslint-config/react'export default defineConfig([jsxConfig, tsxConfig, ignoresConfig])
```## Custom Setup
```js
// eslint.config.mjsimport {
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](https://eslint.org/docs/latest/use/configure/ignore).
## License
Developed in 🇭🇷 Croatia, © Hypernym Studio.
Released under the [MIT](LICENSE.txt) license.