@rpgsu/lint-config
v1.0.1
Published
Lint configs for RPGSU's projects
Readme
lint-config
TS/JS/JSX/Astro linting configs for RPGSU's projects
Install
Run:
pnpm add -D @rpgsu/lint-configConfigs
This package exports the following ESLint configs:
javascriptfor use with JavaScript projectstypescriptfor use with TypeScript projectsastrofor use with Astro projectsreactfor use with React projectsnodecgfor use with NodeCG projects (this one is specifically made for the structure of RPGSU's NodeCG projects, usage with other NodeCG projects may not work as expected)
There's also a Prettier config exported under prettier that adds the prettier-plugin-astro plugin.
To use the Prettier config, create the file .prettierrc.js and add this snippet there:
import prettierConfig from "@rpgsu/lint-config/prettier";
export default prettierConfig;Note for using with pnpm
For using this package with pnpm, you need to create a file called .npmrc in the project root and add the following text into it:
public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=*prettier*Example usage
import tsConfig from '@rpgsu/lint-config/typescript'
export default tsConfig;Recommended editor setup
Visual Studio Code
Install the ESLint Extension, then press Ctrl+Shift+P (Cmd+Shift+P on macOS), open Preferences: Open User Settings (JSON) and add this to the file:
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}This enable fix on save in VSCode for ESLint.
JetBrains WebStorm
ESLint is enabled by default in WebStorm, the only recommended tweak is enabling "fix on save" in ESLint settings.
Zed
ESLint is installed by default in Zed. In the settings go to Editor, and turn on Format on Save.
