@iqrf/eslint-config
v0.2.3
Published
ESLint configuration for IQRF projects
Downloads
486
Readme
@iqrf/eslint-config
Flat ESLint configuration for JavaScript, TypeScript, Vue.js and Vuetify 3.
Features
- ESLint flat configuration
- Languages:
- JavaScript (with JSDoc)
- JSON
- Markdown
- TypeScript
- State managements:
- Pinia
- Testing frameworks:
- Cypress
- Vitest
- Vue.js 2 and 3
- vue-i18n
- Vuetify 3
Installation
Requires Node.js and ESLint >= 8.56.0.
npm
npm install --save-dev @iqrf/eslint-config
pnpm
pnpm add --save-dev @iqrf/eslint-config
Usage
Create a eslint.config.mjs
file in the root of your project with the following content:
import { iqrfEslint } from '@iqrf/eslint-config';
export default iqrfEslint(
{
cypress: true,
ignores: ['dist/', 'node_modules/'],
import: true,
jsdoc: true,
markdown: true,
pinia: true,
promise: true,
regExp: true,
typescript: true,
vitest: true,
vue: true,
vueI18n: true,
vuetify: true,
},
[
// Add your custom rules here
],
);
Visual Studio Code
Enable flat config if you are using ESLint < 9.0.0:
{
"eslint.experimental.useFlatConfig": true
}