@rainstormy/presets-eslint-solid
v1.0.0-rc.0
Published
A predefined, opinionated ESLint configuration suitable for any web project with Solid components.
Downloads
2
Maintainers
Readme
Solid Preset for ESLint
This package provides a predefined, opinionated ESLint configuration suitable for any TypeScript-based web project with Solid components.
This preset configures a subset of rules from the following plugins, which are installed along with the preset package:
- eslint-plugin-jsx-a11y (with rule names prefixed by
jsx-a11y/
) - eslint-plugin-react (only for generic JSX rules, with rule names prefixed by
react/
) - eslint-plugin-solid (with rule names prefixed by
solid/
)
Additionally, it includes the following preset:
Installation
Install the @rainstormy/presets-eslint-solid
package and its peer dependencies:
npm install --save-dev @rainstormy/presets-eslint-solid @rainstormy/presets-eslint eslint typescript
pnpm install --save-dev @rainstormy/presets-eslint-solid @rainstormy/presets-eslint eslint typescript
yarn add --dev @rainstormy/presets-eslint-solid @rainstormy/presets-eslint eslint typescript
Usage
Create or extend a flat ESLint configuration file (eslint.config.js
) and apply the eslintPresetSolid
preset.
For example (with the default options in comments):
import { eslintPresets } from "@rainstormy/presets-eslint"
import { eslintPresetSolid } from "@rainstormy/presets-eslint-solid"
export default eslintPresets({
additionalPresets: [
// ...other presets...
eslintPresetSolid({
// targetFilePatterns: ["**/*.@(jsx|tsx)"],
}),
],
})
In Combination with Storybook, Tailwind CSS, and Testing Library
For example (with the default options applied):
import {
eslintPresetAmbientTypeScriptModules,
eslintPresetTestData,
eslintPresets,
} from "@rainstormy/presets-eslint"
import { eslintPresetSolid } from "@rainstormy/presets-eslint-solid"
import { eslintPresetStorybook } from "@rainstormy/presets-eslint-storybook"
import { eslintPresetTailwind } from "@rainstormy/presets-eslint-tailwind"
import { eslintPresetTestingLibrary } from "@rainstormy/presets-eslint-testing-library"
import { eslintPresetVitest } from "@rainstormy/presets-eslint-vitest"
export default eslintPresets({
additionalPresets: [
eslintPresetAmbientTypeScriptModules(),
eslintPresetSolid(),
eslintPresetStorybook(),
eslintPresetTailwind(),
eslintPresetTestData(),
eslintPresetTestingLibrary(),
eslintPresetVitest(),
],
})