mirror of
https://github.com/plausible/analytics.git
synced 2024-12-28 12:01:39 +03:00
8af3f7332a
* Add testing framework * Test query period picking behaviour
64 lines
1.9 KiB
JSON
64 lines
1.9 KiB
JSON
{
|
|
"root": true,
|
|
"env": {
|
|
"browser": true,
|
|
"es6": true,
|
|
"jest/globals": true
|
|
},
|
|
"plugins": ["import", "jest"],
|
|
"extends": [
|
|
"eslint:recommended",
|
|
"plugin:@typescript-eslint/recommended",
|
|
"plugin:jest/recommended",
|
|
"plugin:jsx-a11y/recommended",
|
|
"plugin:react/recommended",
|
|
"plugin:react-hooks/recommended",
|
|
"prettier"
|
|
],
|
|
"rules": {
|
|
"import/no-unresolved": "error",
|
|
"react/destructuring-assignment": [0],
|
|
"react/prop-types": [0],
|
|
"max-classes-per-file": [0],
|
|
"react/display-name": [0],
|
|
"react/jsx-one-expression-per-line": [0],
|
|
"react/self-closing-comp": [0],
|
|
"no-unused-expressions": [1, { "allowShortCircuit": true }],
|
|
"@typescript-eslint/no-unused-vars": [
|
|
2,
|
|
{
|
|
"args": "all",
|
|
"argsIgnorePattern": "^_",
|
|
"caughtErrors": "all",
|
|
"caughtErrorsIgnorePattern": "^_",
|
|
"destructuredArrayIgnorePattern": "^_",
|
|
"varsIgnorePattern": "^_",
|
|
"ignoreRestSiblings": true
|
|
}
|
|
],
|
|
"no-prototype-builtins": [0],
|
|
"react/jsx-props-no-spreading": [0],
|
|
"jsx-a11y/click-events-have-key-events": [0],
|
|
"jsx-a11y/no-static-element-interactions": [0],
|
|
"react/no-did-update-set-state": [0],
|
|
"react/no-unknown-property": [2, { "ignore": ["tooltip"] }]
|
|
},
|
|
"settings": {
|
|
"import/parsers": {
|
|
"@typescript-eslint/parser": [".ts", ".tsx"]
|
|
},
|
|
"import/resolver": {
|
|
"typescript": {
|
|
"alwaysTryTypes": true // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
|
|
}
|
|
},
|
|
"react": {
|
|
"createClass": "createReactClass", // Regex for Component Factory to use,
|
|
// default to "createReactClass"
|
|
"pragma": "React", // Pragma to use, default to "React"
|
|
"fragment": "Fragment", // Fragment to use (may be a property of <pragma>), default to "Fragment"
|
|
"version": "detect"
|
|
}
|
|
}
|
|
}
|