ESLint config used by Dusk JavaScript apps.
npm i -D @dusk-network/eslint-config
Your package requires the following dev-dependencies:
If you are using Svelte rules your package needs the following dev-dependency:
If you are using Vitest rules your package needs the following dev-dependency:
Add the rulesets you want in the extends
section of your ESLint configuration file.
e.g. to use both JS, Svelte and Vitest rules:
// ...
extends: [
"@dusk-network/eslint-config/js",
"@dusk-network/eslint-config/svelte",
"@dusk-network/eslint-config/vitest"
]
// ...
npm run check
checks for deprecated rules and performs the linting checknpm run check-js
checks for deprecated JS rulesnpm run check-rules
checks for deprecated JS and Svelte rulesnpm run check-svelte
checks for deprecated Svelte rulesnpm run format
performs the Prettier formatting checknpm run format:fix
reformats according to the Prettier rulesnpm run lint
performs the linting checknpm run lint:fix
fixes fixable linting errors