This is eslint configuration meant to be used across different projects and/or repositories within Omni Calculator company.
- eslint — version 9.x must be installed in your projext.
Simply install omnicalculator-eslint-config with your favorite package manager as development dependency
npm install -D omnicalculator-eslint-config
#or
pnpm i -D omnicalculator-eslint-config
#or
yarn add -D omnicalculator-eslint-config
Use this configuration preset in you eslint.config.js
file. If you do not need to extend this configuration simply reexport:
// eslint.config.js
const omniCalculatorEslintConfig = require('omnicalculator-eslint-config');
module.exports = omniCalculatorEslintConfig;
In case you need to extend this configuration simply add your config at the end to exported array:
// eslint.config.js
const omniCalculatorEslintConfig = require('omnicalculator-eslint-config');
module.exports = [
...omniCalculatorEslintConfig,
{
files: ['**/legacy'],
rules: { complexity: 'off'},
}
];
We provide the following custom rules that can be configured with eslint options.
Enforces the usage of isNullish
and isDefined
utility functions for checking nullish and non-nullish values.
Options:
{
utilsImportPath: {
type: 'string',
description:
'Path to utils that will be used for importing isNullish and isDefined utils',
}
}
Install dependencies with:
$ pnpm install
Once you installed depedencies you are good to start development, no other action is required.
- Open PR.
- Set the label with the version update, you need to apply:
major
,minor
orpatch
. - After merging the PR to the main, the version should be updated automatically according to the label.
To publish next version of this npm package just follow github instructions on creating and publishing release in github GUI. Make sure the tag you created corresponds to the current version in package.json.