@ecolovo/eslint-config
v1.0.2
Published
`eslint` configs used by ecolovo developers.
Readme
@ecolovo/eslint-config
eslint configs used by ecolovo developers.
Installation
Install with npm
npm install eslint prettier @ecolovo/eslint-config --save-devInstall with yarn
yarn add eslint prettier @ecolovo/eslint-config --save-devUsage/Examples
// eslint.config.mjs
import { defineEslint } from '@ecolovo/eslint-config';
export default defineEslint({
vue3: true,
ts: true,
configs: [
{
name: 'USER/ecolovo/custom',
rules: {
'eco/no-round-el-button': 'error',
'eco/no-special-components': [
'error',
[['ElInputNumber', 'EcInputNumber']],
],
},
},
],
});Running Tests
To lint your code, run the following command
npx eslint .API Reference
defineEslint
| Parameter | Type | Description |
| :-------- | :---------------- | :-------------------------------------------------------- |
| vue3 | boolean | Default: true. set false if vue2.x. |
| ts | boolean | Default: true. set false if without typescript. |
| configs | Linter.Config[] | Your custom eslint configs to cover the default. |
