@arabasta/eslint-config
Custom ESLint config to share between my projects. Originally extracted from vite-workshop.
Requirements
- This config currently only works with ESLint v8
- The optional TypeScript config requires a
typescript
version that satisfies the following constraint: >=4.8.4 <5.8.0
Installation
Assuming you already have ESLint installed, run:
# npm
npm install --save-dev @arabasta/eslint-config
# yarn
yarn add --dev @arabasta/eslint-plugin-config
# pnpm
pnpm add --save-dev @arabasta/eslint-config
Usage
Usage with ESM
// ...
import { baseConfig } from '@arabasta/eslint-config';
export default [
// ...
...baseConfig,
];
A complete ESM example including React, TypeScript and Vitest can be found here: ESM Example
Usage with CommonJS
// ...
const { baseConfig } = require('@arabasta/eslint-config');
module.exports = [
// ...
...baseConfig,
];
A complete CJS example including React, TypeScript and Jest can be found here: CJS Example
Available configs
baseConfig
- Base config.
typescriptConfig
- Additional config for TypeScript.
typescriptDefinitionsConfig
- Additional config for TypeScript definitions (.d.ts
).
configFilesConfig
- Additional config with adjustments for configuration files like tailwind.config.js
and jest.config.js
.
reactConfig
- Additional config for React.
reactTypescriptConfig
- Additional config for React when using TypeScript.
reduxConfig
- Additional config for Redux and Redux Toolkit when using React.
jestConfig
- Additional config for Jest.
rtlJestConfig
- Additional config for Testing Library when using Jest.
vitestConfig
- Additional config for Vitest.
rtlVitestConfig
- Additional config for Testing Library when using Vitest.
Plugins
Plugin packages included in this ESLint config:
- @arabasta/eslint-plugin-javascript@1.0.0
- @arabasta/eslint-plugin-react@1.0.0
- @arabasta/eslint-plugin-testing-library@1.0.0
- @arabasta/eslint-plugin-tsoa@1.1.1
- @arabasta/eslint-plugin-typescript@1.0.1
- @eslint-community/eslint-plugin-eslint-comments@4.4.1
- @typescript-eslint/eslint-plugin@7.18.0
- @vitest/eslint-plugin@1.1.12
- eslint-plugin-deprecation@3.0.0
- eslint-plugin-es@4.1.0
- eslint-plugin-import@2.31.0
- eslint-plugin-jest@28.9.0
- eslint-plugin-jsdoc@50.6.0
- eslint-plugin-jsx-a11y@6.10.2
- eslint-plugin-new-with-error@5.0.0
- eslint-plugin-react@7.37.2
- eslint-plugin-react-hooks@5.0.0
- eslint-plugin-react-refresh@0.4.14
- eslint-plugin-testing-library@7.0.0
- eslint-plugin-unused-imports@3.2.0
License
MIT