eslint-config-crypho v1.10.2
Crypho eslint configuration
This package contains the standard eslint configuration for Crypho.
It exposes separate configurations:: one for normal usage and one for React projects.
JavaScript
For Javascript projects you only need to add @crypho to your
.eslintrc:
{
"extends": [
"crypho"
]
}This will enable the following rules:
- The recommended config from eslint-plugin-unicorn
- The recommended rules fron eslint-plugin-promise(https://www.npmjs.com/package/eslint-plugin-promise
- Using eslint-plugin-prettier to remove conflicts between prettier and eslint.
- Assume an ES6 environment
- For test files also enable the
jestandnodeenvironments.
TypeScript
If you use Typescript you will also need to install some extra packages:
npm install @typescript-eslint/eslint-plugin @typescript-eslint/parser --save-devor, if you use yarn:
yarn add @typescript-eslint/eslint-plugin @typescript-eslint/parser --only=devYou must also add crypho/typescript to your .eslintrc configuration file:
{
"extends": [
"crypho",
"crypho/typescript"
]
}React
For React using projects you can also enable a set of React-specific rules:
{
"extends": [
"crypho",
"crypho/react",
]
}This enables several rules:
- Use Babel to parse files
For
*.jsxand*.tsxfiles:- Enable JSX parsing
- Disable the
unicorn/filename-caserule
Assume a
browserenvironment in all files- The recommended rules from eslint-plugin-react
Command-line tools
For packages containing only command-line tools you can use the crypho/cli ruleset:
{
"extends": [
"crypho",
"crypho/cli",
]
}This will:
- assume the
nodeenvironment - allow console statements
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago