@dg-scripts/eslint-config
Version:
ESLint configuration used by dg-scripts.
68 lines (48 loc) • 2.8 kB
Markdown
# @dg-scripts/eslint-config
[](https://github.com/sabertazimi)
[](https://raw.githubusercontent.com/sabertazimi/bod/main/LICENSE)
[](https://www.npmjs.com/package/@dg-scripts/eslint-config)
[](https://www.npmjs.com/package/@dg-scripts/eslint-config)
[](https://cdn.jsdelivr.net/npm/@dg-scripts/eslint-config@latest/)
[](https://github.com/sabertazimi/bod/actions/workflows/ci.yml)
[](https://codecov.io/gh/sabertazimi/bod)
[](https://github.com/sabertazimi/bod/actions/workflows/ci.yml)
This package includes the shareable ESLint configuration used by [Bod CLI](https://github.com/sabertazimi/bod).
## Installation
```bash
npm install -D @dg-scripts/eslint-config
```
## Usage
Create a file named `eslint.config.js`
with following contents in the root folder of your project:
```js
export { default } from '@dg-scripts/eslint-config'
```
You can override the settings from `@dg-scripts/eslint-config`
by editing the `eslint.config.js` file:
```js
import eslintConfig from '@dg-scripts/eslint-config'
export default eslintConfig.append(
{
ignores: ['cypress', 'cypress.config.ts'],
},
).append({
rules: {
'react-refresh/only-export-components': 'off',
},
})
```
## Next.js
When package `next` and `eslint-config-next` installed in project,
eslint configuration will enable automatically,
no need for any additional configuration.
## Disable Type Aware Rules
Type aware [rules](https://typescript-eslint.io/getting-started/typed-linting)
can opt-out by:
```js
export { disableTypeAware as default } from '@dg-scripts/eslint-config'
```
## Contact
[](mailto:sabertazimi@gmail.com)
[](https://twitter.com/sabertazimi)
[](https://github.com/sabertazimi)