Install the package via
npm i @iobroker/eslint-config --save-dev
Just extend this project in your lint config in your eslint.config.mjs
.
import config from '@iobroker/eslint-config';
export default [...config];
And create a prettier.config.mjs
with the following content:
import prettierConfig from '@iobroker/eslint-config/prettier.config.mjs';
export default prettierConfig;
Optionally, if you are using ESM modules, there is an additional config.
Your eslint.config.mjs
would then look like this:
import config, { esmConfig } from '@iobroker/eslint-config';
export default [...config, ...esmConfig];
To use this config in a ReactJS project, your eslint.config.mjs
would then look like this:
import config, { reactConfig } from '@iobroker/eslint-config';
export default [...config, ...reactConfig];
It is suggested to create separate eslint.config.mjs
files for backend and for ReactJS.
- (@GermanBluefox) Added
no-duplicate-imports
rule - (@mcm1957/@foxriver76) allow unused args with
_
prefix in JavaScript too
- (@foxriver76) Allow
require
imports for.js
files
- (@GermanBluefox) Enforce the use of template literals instead of string concatenation: "Hello, " + name + "!" =>
Hello, ${name}!
- (@GermanBluefox) Added
no-else-return
rule
- (@GermanBluefox) added ReactJS eslint config file
- (@GermanBluefox) adjust initial
prettier
rules
- (@foxriver76) fixed problems with tsconfig
- (@foxriver76) initial release