0.12.0 • Published 4 years ago

@zebra-c/eslintrc v0.12.0

Weekly downloads
-
License
-
Repository
github
Last release
4 years ago

@zebra-c/eslintrc

支持 vue、jsx、js、ts、tsx、html

Installation

npm add -D @zebra-c/eslintrc

package.json

Config in package.json:

{
  "eslintConfig": {
    "extends": ["@zebra-c"]
  },
  "eslintIgnore": ["!.eslintrc.js", "!.prettierrc.js", "index.js"],
  "prettier": "@zebra-c/eslintrc/.prettierrc.js"
}

.eslintrc.js

Add to your eslint config (.eslintrc.js):

module.exports = {
  root: true,
  extends: '@zebra-c',
}

vue ts

module.exports = {
  root: true,
  extends: '@zebra-c',
  parserOptions: {
    parser: '@typescript-eslint/parser',
    ecmaFeatures: {
      legacyDecorators: true,
    },
  },
}

More

.eslintignore

!.eslintrc.js
!.prettierrc.js

.prettierrc.js

module.exports = {
  ...require('@zebra-c/eslintrc/.prettierrc.js'),
}

.prettierignore

**/node_modules/*

.editorconfig

# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.gradle]
indent_size = 4

[BUCK]
indent_size = 4