gs-lint

raw JSON →
0.4.0 verified Fri May 01 auth: no javascript

gs-lint is a shared ESLint and Stylelint configuration package for Garmin Sports projects. Version 0.4.0 supports Node >= 10.15.3 and npm >= 6.9.0. It provides preset linting rules to enforce code quality and consistency, but lacks detailed documentation and breaking changes history. Maintained as part of the gs-common monorepo.

error Cannot find module 'gs-lint'
cause The package is not installed or not in node_modules.
fix
Run 'npm install --save-dev gs-lint'.
error ESLint couldn't find the config 'gs-lint'.
cause Misconfiguration or missing dependency.
fix
Ensure gs-lint is installed and extends is set correctly in .eslintrc.
gotcha Stylelint config must be extended from 'gs-lint/stylelint' not 'gs-lint'.
fix Use 'extends': ['gs-lint/stylelint'] in your .stylelintrc.
npm install gs-lint
yarn add gs-lint
pnpm add gs-lint

Shows installation and configuration for ESLint and Stylelint using gs-lint presets.

// Install
yarn add --dev gs-lint eslint stylelint

// .eslintrc.js
module.exports = {
  extends: ['gs-lint'],
};

// .stylelintrc.js
module.exports = {
  extends: ['gs-lint/stylelint'],
};

// package.json
{
  "scripts": {
    "lint": "eslint . --ext .js,.jsx,.ts,.tsx",
    "stylelint": "stylelint '**/*.css'"
  }
}