This package has been deprecated

Author message:

Please use @knodes/eslint-config instead. See https://www.npmjs.com/package/@knodes/eslint-config

@scitizen/eslint-config

1.5.1 • Public • Published

@scitizen/eslint-config

ESLint rules & presets for Scitizen

This set of rules is released open-source for anyone to use. It is meant to be a strict, aerated configuration.

Main features

is always installed, ◻️ is optional.

Configurations quick outline:

  • Angular:
    • @scitizen/eslint-config/angular
    • @scitizen/eslint-config/angular/jest
    • For libs:
      • @scitizen/eslint-config/angular/lib
      • @scitizen/eslint-config/angular/lib/jest
  • Nest: @scitizen/eslint-config/nest
  • Bare:
    • Pure JS: @scitizen/eslint-config/js
    • JS + TS: @scitizen/eslint-config/ts
    • JS + TS + rxjs: @scitizen/eslint-config/ts-rxjs

You can also use configuration fragments from @scitizen/eslint-config/config-fragments/*. See the directory on GitHub.

Installation & configuration

For any preset, you must at least install base dependencies.

npm install --save-dev @scitizen/eslint-config eslint eslint-plugin-import eslint-plugin-jsdoc eslint-plugin-prefer-arrow eslint-plugin-sort-export-all eslint-plugin-eslint-comments

If you're using Typescript, install also @typescript-eslint related dependencies.

npm install --save-dev @typescript-eslint/eslint-plugin @typescript-eslint/parser

Angular

npm install --save-dev @scitizen/eslint-config eslint \
  eslint-plugin-import eslint-plugin-jsdoc eslint-plugin-prefer-arrow eslint-plugin-sort-export-all eslint-plugin-eslint-comments \
  @typescript-eslint/eslint-plugin @typescript-eslint/parser \
  @angular-eslint/eslint-plugin @angular-eslint/eslint-plugin-template @angular-eslint/template-parser

Without/other framework

See sample .eslintrc.js for Typescript
module.exports = {
	env: { /* See https://eslint.org/docs/user-guide/configuring#specifying-environments. es2020 is enabled by default */ },
	extends: '@scitizen/eslint-config/ts',
	parserOptions: {
		project: './tsconfig.json',
	},
};
See sample .eslintrc.js for Javascript
module.exports = {
	env: { /* See https://eslint.org/docs/user-guide/configuring#specifying-environments. es2020 is enabled by default */ },
	extends: '@scitizen/eslint-config/js',
};
Assumed directory structure
  • *.{j,t}s: Project configuration files. Light lint rules are applied. It includes .eslintrc.js.
  • **
    • index.[jt]s{x,}: Barrel files, only exporting other source files
    • *.[jt]s{x,}: Source files
    • *.{spec,test}.[jt]s{x,}: Unit test files. Configured for jest by default, unless framework use a different test runner
    • __mocks__/**/*.[jt]s{x,}: Module mocks for unit tests
    • test-utils/**/*.[jt]s{x,}: Various testing utilities

Versions

Current Tags

VersionDownloads (Last 7 Days)Published

Version History

VersionDownloads (Last 7 Days)Published

Package Sidebar

Install

npm i @scitizen/eslint-config

Weekly Downloads

3

Version

1.5.1

License

MIT

Unpacked Size

39.1 kB

Total Files

32

Last publish

Collaborators

  • gerkin