1.3.0 • Published 9 months ago

@fmss/eslint-plugin v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@fmss/eslint-plugin

License: MIT npm version

FMSS's ESLint rules and configs

Installation

You'll first need to install ESLint:

With npm

$ npm install --save-dev @fmss/eslint-plugin

With yarn

$ yarn add --dev @fmss/eslint-plugin

With pnpm

$ pnpm add --save-dev @fmss/eslint-plugin

Usage

From version 46.0.0, this package uses ESLint's "Flat Config" format. To upgrade, follow the, follow the Configuration Migration Guide.


FMSS’s ESLint configs are included in this package. Add the relevant configurations to your project's eslint.config.js. For example, to use the ESNext (ES2015 and later) config:

import fmssEslintPlugin from '@fmss/eslint-plugin';

export default [...fmssEslintPlugin.configs.esnext];

You can augment the "core" config with additional ones. For example, to extend the ESNext config with React:

import fmssEslintPlugin from '@fmss/eslint-plugin';

export default [
  ...fmssEslintPlugin.configs.esnext,
  ...fmssEslintPlugin.configs.react,
];

If using TypeScript and React, combine the TypeScript base config with React and Prettier:

import fmssEslintPlugin from '@fmss/eslint-plugin';

export default [
  ...fmssEslintPlugin.configs.typescript,
  ...fmssEslintPlugin.configs.react,
  ...fmssEslintPlugin.configs.prettier,
];