easy-eslint-config-pro

1.0.7 • Public • Published

easy-eslint-config-pro

Installation

npm i easy-eslint-config-pro --save-dev

根目录下创建.prettierc.js,添加如下内容:

const config = require("easy-eslint-config-pro");

module.exports = {
  ...config.prettier,
};

根目录下创建.stylelintrc.js,添加如下内容:

const config = require("easy-eslint-config-pro");

module.exports = {
  ...config.stylelint,
};

根目录下创建 commitlint.config.js,添加如下内容:

const config = require("easy-eslint-config-pro");

module.exports = {
  ...config.commitlint,
};

package.json,添加如下内容:

"scriots":{
    "lint": "eslint --ext .js,.jsx,.ts,.d.ts,.tsx ./",
    "lint:fix": "eslint --fix --ext .js,.jsx,.ts,.d.ts,.tsx ./",
    "style": "stylelint 'src/**/*.less' --syntax less",
    "style:fix": "stylelint --fix 'src/**/*.less' --syntax less",
    "prettier": "prettier --check '**/*'",
    "prettier:fix": "prettier --write '**/*'"
},
"husky": {
    "hooks": {
        "pre-commit": "lint-staged",
        "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
    }
},
"lint-staged": {
    "*.less": [
        "stylelint --syntax=less"
    ],
    "*.{js,jsx,d.ts,ts,tsx}": [
        "eslint"
    ],
    "*": [
        "prettier --write"
    ]
}

Dependencies (26)

Dev Dependencies (2)

Package Sidebar

Install

npm i easy-eslint-config-pro

Weekly Downloads

1

Version

1.0.7

License

ISC

Unpacked Size

9.35 kB

Total Files

16

Last publish

Collaborators

  • gzxnydia