@aristid/eslint-plugin
v2.5.0
Published
A set of eslint custom rules for Aristid Retail Technology projects
Readme
@aristid/eslint-plugin
An ESLint plugin with rules for Aristid projects
Get started
Prerequisites
- ESLint v9.x (flat config)
eslint.config.jsfile (flat config format)
Installation
yarn add -D @aristid/eslint-pluginIn your eslint.config.js, extend the recommended config:
import { defineConfig } from "eslint/config";
import aristid from "@aristid/eslint-plugin";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
export default defineConfig([
aristid,
eslintPluginPrettierRecommended,
{
rules: {
// override rules if needed
},
},
]);How to deploy
Package is deployed to npm registry via GitLab CI.
Release process
- Bump the version in
package.jsonand merge onmain. - Create a git tag matching the version exactly (e.g.
2.3.0for"version": "2.3.0"). - The CI pipeline runs automatically and publishes to npmjs.org.
The pipeline will fail with an explicit message if the tag name does not match the version in package.json.
Renewing the NPM_TOKEN
The CI authenticates to npm using the NPM_TOKEN CI/CD variable. It is a Granular Access Token that expires after 90 days and must be renewed.
This operation can be performed by:
- Sébastien Berthier —
[email protected] - Emile Voiron-Levy —
[email protected] - Philippe Chevieux —
[email protected]
Steps:
- On npmjs.com, generate a new Granular Access Token with an expiration of 90 days and the following permissions:
- Package
@aristid/eslint-plugin: Read and write - Organization
aristid: Read and write
- Package
- In GitLab, go to Settings → CI/CD → Variables and update (or create) the
NPM_TOKENvariable with the new token value.
Manual publish (fallback)
npm login
npm publish --access publicHow to test locally
You may want to test your new configuration in local, please run this command inside the project using this plugin:
yarn link ../[relative_path]/eslint-pluginAnd update in eslint.config.js the plugin import:
import aristid from "../[relative_path]/eslint-plugin/index.js";