2.7.1 • Published 7 years ago
eslint-config-gourmet v2.7.1
eslint-config-gourmet
ESLint shareable config for the Gourmet style.
Basic usage
JavaScript format (.eslintrc.js)
module.exports = {
extends: "gourmet",
root: true
};JSON format (.eslintrc.json)
{
"extends": "gourmet",
"root": true
}Configuration sets
You can choose a configuration set based on the type of your target environment by specifying the name after a slash like "gourmet/node".
node: Node apps (default)- ES2017 syntax (
class,async,await, ...) - CommonJS (
require(),module.exports, ...) - No dependency other than a vanilla eslint
- ES2017 syntax (
react: React apps- Based on
node, additional features as follows: - Browser globals (
document,window, ...) - JSX syntax and React specific rules (
react/jsx-uses-react, ...) - Requires
eslint-plugin-react@7as a peer dependency
- Based on
gourmet_lib: Gourmet SSR libraries- Based on
react, additional features as follows: - Gourmet SSR specific globals (
SERVER,DEBUG, ...)
- Based on
gourmet_app: Gourmet SSR apps- Based on
gourmet_lib, additional features as follows: - Module syntax (
import,export, ...) - ES proposals (https://github.com/tc39/proposal-class-fields, ...)
- Requires
babel-eslint@10andeslint-plugin-babel@5as peer dependencies.
- Based on
Installing additional packages
As noted above, eslint-config-gourmet requires additional packages per your choice of configuration as below:
# For `react` and `gourmet_lib`
npm install eslint-plugin-react@7 --save-dev
# For `gourmet_app`
npm install eslint-plugin-react@7 babel-eslint@10 eslint-plugin-babel@5 --save-devThese additional packages are not specified as
peerDependenciesbyeslint-config-gourmetbecause they are not required for some configurations.