eslint-config-ant-base
v0.9.3
Published
ant的eslint的styleguide
Downloads
3
Maintainers
Readme
eslint-config-ant-base
This package provides ant's .eslintrc as an extensible shared config.
Usage
We export one ESLint configurations for your usage.
eslint-config-ant-base
Our default export contains strong recommend
rules of our ESLint rules, including ECMAScript 6+ and React. It requires eslint
, eslint-plugin-ant
, eslint-plugin-react
, and eslint-plugin-jsx-a11y
.
- Ensure packages are installed with correct version numbers by running:
(
export PKG=eslint-config-airbnb;
npm info "$PKG" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG"
)
Which produces and runs a command like:
npm install --save-dev eslint-config-ant-base eslint@^#.#.# eslint-plugin-jsx-a11y@^#.#.# eslint-plugin-ant@^#.#.# eslint-plugin-react@^#.#.#
- Add
"extends": "ant-base"
to your .eslintrc
for more information.
Improving this config
Consider adding test cases if you're making complicated rules changes, like anything involving regexes. Perhaps in a distant future, we could use literate programming to structure our README as test cases for our .eslintrc?
You can make sure this module lints with itself using npm run lint
.