Skip to content

Latest commit

 

History

History
104 lines (76 loc) · 2.47 KB

README.md

File metadata and controls

104 lines (76 loc) · 2.47 KB

eslint-config-pat

Same great taste, same low price!

A very me-specific ESLint config.

npm install --save-dev eslint-config-pat

Use

This package takes advantage of ESLint's shared multiple configs — that is, there are four different configs shared via this package:

  • pat: For linting Javascript.
  • pat/node: For linting Node.js projects.
  • pat/react: For linting React.js projects.
  • pat/mocha: For linting Mocha test suites.

All configs rely on eslint, but the most specific configs rely on plugins as well.

pat: Base Config

  • Requires:
    • eslint >=8.16.0

The pat configuration is the base for this package. It only declares rules that are shipped with ESLint — therefore it relies on no plugins. It's useful for linting really any Javascript.

Example usage:

/**
 * .eslintrc.js
 */
module.exports = {
  extends: "pat",
}

pat/node: Node.js Config

  • Requires:
    • eslint >=8.16.0
    • eslint-plugin-node >=11.1.0

The pat/node configuration is used for linting Node.js projects. It extends from the pat base config, while adding rules from eslint-plugin-node.

Example usage:

/**
 * .eslintrc.js
 */
module.exports = {
  extends: "pat/node",
}

pat/react: React.js Config

  • Requires:
    • eslint >=8.16.0
    • eslint-plugin-react >=7.30.0

The pat/react configuration is used for linting React.js projects. It extends from the pat base config, while adding rules from eslint-plugin-react.

Example usage:

/**
 * .eslintrc.js
 */
module.exports = {
  extends: "pat/react",
}

pat/mocha: Mocha Config

  • Requires:
    • eslint >=8.16.0
    • eslint-plugin-mocha >=10.0.0

The pat/mocha configuration is used for linting Mocha test suites. It extends from the pat base config, while adding rules from eslint-plugin-mocha.

Example usage:

/**
 * .eslintrc.js
 */
module.exports = {
  extends: "pat/mocha",
}