@openweb3-io/eslint-config
v1.0.0
Published
OpenWeb3 Common ESLint Configs
Readme
OpenWeb3 ESLint Config
This package provides OpenWeb3's eslint extensible shared config.
Usage
Install
pnpm i -D eslint @openweb3-io/eslint-configAnd create eslint.config.mjs in your project root:
- for typescript only project:
import eslint from "@openweb3-io/eslint-config";
export default [...eslint.recommended.typescript];- for typescript & react project:
import eslint from "@openweb3-io/eslint-config";
export default [...eslint.recommended.react];Add script for package.json
{
"scripts": {
"lint": "eslint",
"lint-fix": "eslint --fix"
}
}Customization
You can easily customize the config, for example:
import eslint from "@openweb3-io/eslint-config";
import storybook from "eslint-plugin-storybook";
export default [
...eslint.recommended.react,
...storybook.configs["flat/recommended"],
{
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: [".storybook/*.ts"],
},
},
},
rule: {
"no-console": ["warn", { allow: ["warn", "error"] }],
"i18next/no-literal-string": "off",
"@typescript-eslint/no-explicit-any": "off",
},
},
];