eslint-config-amalitsky

1.0.2 • Public • Published

Eslint Presets for JavaScript and TypeScript Files

Sharable configs for ESLint to avoid copy-pasting rule files over and over again. Very opinionated but allows to skip Prettier, yay!

List of Configs (Rule Sets)

  • amalitsky/recommended - default set. Doesn't extend but is commonly used on top of eslint:recommended, google and plugin:@typescript-eslint/recommended. Sets parser to @typescript-eslint/parser.

  • amalitsky/imports - linting rules for file imports.

  • amalitsky/newlines - rules for padding code blocks with empty lines. Based on object-curly-newline and padding-line-between-statements rules.

  • amalitsky/naming - rules for naming variables, properties, classes and interfaces. Based on @typescript-eslint/naming-convention rule.

  • amalitsky/react - rules for projects with React. Supposed to be used with react/recommended and react-hooks/recommended.

Recommended set does not include any other rule set present in the package.

How To Use

Run npm install -D eslint-config-amalitsky to install the package.

Then include rule sets you are interested in with extends property of .eslintrc.js file. I.e. extends: ['eslint:recommended', 'google', 'amalitsky/recommended', 'amalitsky/imports'].

Feel free to use local eslintrc file as an example. Yep, this project code is being linted with same rule sets it is exporting. Recursion at its best!

Expects Following Peer Dependencies

  • Not surprisingly, eslint
  • typescript since @typescript-eslint/parser is being used
  • @typescript-eslint/parser
  • @typescript-eslint/eslint-plugin
  • eslint-plugin-react and eslint-plugin-react-hooks for the react set
  • eslint-plugin-import for imports set

Install

npm i eslint-config-amalitsky

DownloadsWeekly Downloads

29

Version

1.0.2

License

MIT

Unpacked Size

13.7 kB

Total Files

11

Last publish

Collaborators

  • amalitsky