mirror of
https://github.com/HackPlan/polaris-react.git
synced 2026-04-30 02:05:47 +08:00
87 lines
2.4 KiB
Plaintext
87 lines
2.4 KiB
Plaintext
{
|
|
"extends": [
|
|
"plugin:shopify/typescript",
|
|
"plugin:shopify/react",
|
|
"plugin:shopify/jest",
|
|
"plugin:shopify/node",
|
|
"plugin:shopify/polaris",
|
|
"plugin:shopify/prettier"
|
|
],
|
|
"settings": {
|
|
"react": {
|
|
"version": "16.3"
|
|
}
|
|
},
|
|
"rules": {
|
|
"func-style": "off",
|
|
"no-process-env": "off",
|
|
"no-warning-comments": "off",
|
|
"no-negated-condition": "off",
|
|
"consistent-return": "off",
|
|
"match-default-export-name": "off",
|
|
"jsx-use-translation-function": "off",
|
|
"lines-around-comment": [
|
|
"error",
|
|
{
|
|
"beforeBlockComment": false,
|
|
"allowBlockStart": false
|
|
}
|
|
],
|
|
"babel/no-unused-expressions": "off",
|
|
"import/named": "off",
|
|
"import/no-named-as-default": "off",
|
|
"react/button-has-type": "off",
|
|
"react/no-array-index-key": "off",
|
|
"react/jsx-fragments": ["error", "element"],
|
|
"react/no-unsafe": ["error", {"checkAliases": true}],
|
|
"shopify/jsx-no-complex-expressions": "off",
|
|
"shopify/jsx-prefer-fragment-wrappers": "off",
|
|
"shopify/no-ancestor-directory-import": "error",
|
|
"shopify/react-prefer-private-members": "off",
|
|
"jsx-a11y/label-has-for": [
|
|
2,
|
|
{
|
|
"required": {
|
|
"some": ["nesting", "id"]
|
|
},
|
|
"allowChildren": false
|
|
}
|
|
],
|
|
"jsx-a11y/no-autofocus": "off",
|
|
"jsx-a11y/anchor-has-content": "off",
|
|
"jsx-a11y/control-has-associated-label": "off",
|
|
"jsx-a11y/role-supports-aria-props": "off",
|
|
"jsx-a11y/mouse-events-have-key-events": "off",
|
|
"jsx-a11y/click-events-have-key-events": "off",
|
|
"jsx-a11y/no-noninteractive-element-interactions": "off",
|
|
"jsx-a11y/no-noninteractive-element-to-interactive-role": "off"
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": ["**/*.test.{ts,tsx}"],
|
|
"rules": {
|
|
"jest/no-truthy-falsy": "off",
|
|
"shopify/jsx-no-hardcoded-content": "off",
|
|
"shopify/no-ancestor-directory-import": "off"
|
|
}
|
|
},
|
|
{
|
|
"files": ["examples/**/*.js"],
|
|
"rules": {
|
|
"import/no-extraneous-dependencies": "off",
|
|
"import/no-unresolved": "off",
|
|
"react/prop-types": "off",
|
|
"shopify/jsx-no-hardcoded-content": "off"
|
|
}
|
|
},
|
|
{
|
|
"files": ["playground/Playground.tsx"],
|
|
"rules": {
|
|
"react/prefer-stateless-function": "off",
|
|
"shopify/jsx-no-hardcoded-content": "off",
|
|
"shopify/react-initialize-state": "off"
|
|
}
|
|
}
|
|
]
|
|
}
|