FE Lint

raw JSON →
2.0.2 verified Fri May 01 auth: no javascript maintenance

A lint configuration preset for front-end projects, including ESLint for JavaScript/React and Sass Lint for SCSS. Currently at version 2.0.2, updated for ESLint 4. The package provides a single .eslintrc configuration file tailored for React and standard JavaScript linting. Note: SCSS linting (.scss-lint.yml) is discontinued. This is a minimal, opinionated lint set for quicker setup with limited extensibility compared to larger lint config presets.

error Error: Cannot find module 'sl-fe-lint' from '/path/to/project'
cause Package not installed in node_modules; missing npm install.
fix
Run 'npm install --save-dev sl-fe-lint' in your project directory.
error ESLint: Configuration for rule "react/jsx-indent" is invalid
cause In version 2.0.2, jsx-indent rule was removed; your config still references it.
fix
Update your ESLint config to not extend old version; reinstall sl-fe-lint@latest and remove custom overrides for jsx-indent.
error SassLint: No configuration found for .sass-lint.yml
cause You are referencing a non-existent file or path is incorrect.
fix
Ensure the extends path is relative to project root: './node_modules/sl-fe-lint/.sass-lint.yml'
breaking scss-lint.yml is discontinued and no longer provided. Using it may cause errors.
fix Remove any reference to .scss-lint.yml and use .sass-lint.yml or switch to stylelint.
breaking V2 update changed ESLint config for ESLint 4; incompatible with ESLint 3 or earlier.
fix Upgrade ESLint to version 4+ or continue using older version of the package.
deprecated .scss-lint.yml file is deprecated and discontinued.
fix Use .sass-lint.yml or migrate to stylelint.
gotcha The package does not export any JavaScript module; it only provides configuration files.
fix Use the config files as extended configurations in your linting tools, not as JS modules.
gotcha The package has no published CHANGELOG or migration guide; updates may break configs silently.
fix Test after each update and review the repository's commit history for changes.
npm install sl-fe-lint
yarn add sl-fe-lint
pnpm add sl-fe-lint

Shows how to install and configure the ESLint preset for a front-end project.

// 1. Install dependencies
npm install --save-dev eslint sl-fe-lint

// 2. Create .eslintrc.json in your project root
{
  "extends": "./node_modules/sl-fe-lint/.eslintrc"
}

// 3. Lint your code
npx eslint src/**/*.js