@hiddenraven/eslint-config
v2.0.0
Published
Install `@hiddenraven/eslint-config`
Downloads
159
Readme
Installation
Install @hiddenraven/eslint-config
pnpm add -D eslint @hiddenraven/eslint-config
# or
bun add -D eslint @hiddenraven/eslint-config
Then add the plugin to your ESLint config:
// eslintrc.config.mjs
import baseConfig, { restrictEnvAccess } from '@hiddenraven/eslint-config/base'
/** @type {import('typescript-eslint').Config} */
export default [...baseConfig, ...restrictEnvAccess]
restrictEnvAccess
contains custom rules to prevent importing environment variables from process.env
when using @t3-oss/env.
This package also includes config for React
& NextJS
With React
// eslintrc.config.mjs
import baseConfig, { restrictEnvAccess } from '@hiddenraven/eslint-config/base'
import reactConfig from '@hiddenraven/eslint-config/react'
/** @type {import('typescript-eslint').Config} */
export default [...baseConfig, ...reactConfig, ...restrictEnvAccess]
With NextJS
// eslintrc.config.mjs
import baseConfig, { restrictEnvAccess } from '@hiddenraven/eslint-config/base'
import nextjsConfig from '@hiddenraven/eslint-config/nextjs'
import reactConfig from '@hiddenraven/eslint-config/react'
/** @type {import('typescript-eslint').Config} */
export default [
...baseConfig,
...reactConfig,
...nextjsConfig,
...restrictEnvAccess
]
If using in a monorepo with
// eslintrc.config.mjs
import baseConfig, { restrictEnvAccess } from '@hiddenraven/eslint-config/base'
import turboConfig from '@hiddenraven/eslint-config/turbo'
/** @type {import('typescript-eslint').Config} */
export default [...baseConfig, ...turboConfig, ...restrictEnvAccess]