Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
eslint-config-egg
Advanced tools
Node Style Guide for Egg.
npm i eslint eslint-config-egg --save-dev
package.json
{
"devDependencies": {
"eslint-config-egg": "7",
"eslint": "4"
}
}
.eslintrc.js
module.exports = {
extends: 'eslint-config-egg',
};
If you want to use eslint-config-egg with experimental features such as async function
, you should use babel-eslint
parser:
package.json
{
"devDependencies": {
"eslint-config-egg": "7",
"eslint": "4",
"babel-eslint": "8"
}
}
.eslintrc.js
module.exports = {
extends: 'eslint-config-egg',
// for experimental features support
parser: 'babel-eslint',
rules: {
// see https://github.com/eslint/eslint/issues/6274
'generator-star-spacing': 'off',
'babel/generator-star-spacing': 'off',
}
};
If you want to use eslint-config-egg with react, jsx and es6 modules:
package.json
{
"devDependencies": {
"eslint-config-egg": "7",
"eslint": "4",
"babel-eslint": "8",
"eslint-plugin-react": "7"
}
}
.eslintrc.js
module.exports = {
extends: 'eslint-config-egg',
// for experimental features support
parser: 'babel-eslint',
parserOptions: {
// for es6 module
sourceType: 'module',
},
plugins: [
'react',
],
rules: {
// for variables in jsx
'react/jsx-uses-vars': 'error',
// see https://github.com/eslint/eslint/issues/6274
'generator-star-spacing': 'off',
'babel/generator-star-spacing': 'off',
},
};
popomore | fengmk2 | atian25 | benjycui | geekdada | dead-horse |
---|---|---|---|---|---|
bowei-jbw | aladdin-add | hotoo |
This project follows the git-contributor spec, auto updated at Mon Mar 11 2019 15:51:28 GMT+0800
.
FAQs
Node.js Style Guide for EggJS
The npm package eslint-config-egg receives a total of 16,086 weekly downloads. As such, eslint-config-egg popularity was classified as popular.
We found that eslint-config-egg demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.