Many of the rules are currently disabled; the plan is to build on top of this later.

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
XhmikosR
2020-04-26 12:20:34 +03:00
parent e8a313c5c7
commit 2c712ae0e5
3 changed files with 1941 additions and 18 deletions
+1 -4
View File
@@ -32,11 +32,8 @@ jobs:
- name: Install npm dependencies
run: npm ci
- name: Check Formatting
run: npm run check-format
- name: Lint
run: npm run lint
run: npm run xo
- name: Test
run: npm run coverage
+1874 -3
View File
File diff suppressed because it is too large Load Diff
+66 -11
View File
@@ -26,6 +26,9 @@
"@types/sha.js": "^2.4.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"eslint-config-xo-react": "^0.23.0",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^3.0.0",
"faker": "^4.1.0",
"fetch-mock": "^9.4.0",
"fs-extra": "^9.0.0",
@@ -37,7 +40,8 @@
"prettier": "^2.0.5",
"react-scripts": "^3.4.1",
"redux-saga-test-plan": "^4.0.0-rc.3",
"typescript": "^3.8.3"
"typescript": "^3.8.3",
"xo": "^0.29.1"
},
"dependencies": {
"@coreui/coreui": "^2.1.16",
@@ -76,10 +80,11 @@
"test": "react-scripts test --env=jsdom",
"coverage": "react-scripts test --env=jsdom --coverage",
"codecov": "codecov",
"lint": "eslint --ignore-path .gitignore --ext js,ts,tsx .",
"eject": "react-scripts eject",
"lint": "npm run xo",
"xo": "xo",
"format": "prettier --write \"**/*.{js,tsx}\" --ignore-path .gitignore",
"check-format": "prettier --list-different \"**/*.{js,tsx}\" --ignore-path .gitignore"
"check-format": "prettier --list-different \"**/*.{js,tsx}\" --ignore-path .gitignore",
"eject": "react-scripts eject"
},
"browserslist": [
"defaults",
@@ -92,17 +97,67 @@
],
"prettier": {
"arrowParens": "avoid",
"trailingComma": "none"
"bracketSpacing": true,
"singleQuote": false,
"trailingComma": "none",
"useTabs": false
},
"eslintConfig": {
"root": true,
"xo": {
"extends": [
"react-app"
"xo-react"
],
"prettier": true,
"space": true,
"envs": [
"browser"
],
"rules": {
"@typescript-eslint/consistent-type-assertions": "off",
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"@typescript-eslint/promise-function-async": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"camelcase": "off",
"capitalized-comments": "off",
"import/no-named-as-default": "off",
"import/no-unassigned-import": [
"error",
{
"allow": [
"**/*.{css,scss}"
]
}
],
"no-negated-condition": "off",
"object-curly-spacing": [
"error",
"always"
],
"prefer-promise-reject-errors": "off",
"promise/prefer-await-to-then": "off",
"react/display-name": "off",
"react/no-access-state-in-setstate": "error",
"react/prop-types": "off"
}
"react/no-array-index-key": "off",
"react/prop-types": "off",
"spaced-comment": "off",
"unicorn/filename-case": "off",
"unicorn/no-zero-fractions": "off",
"unicorn/prefer-query-selector": "off",
"unicorn/prevent-abbreviations": "off"
},
"overrides": [
{
"files": [
"src/setupTests.tsx",
"**/__tests__/**"
],
"envs": [
"jest"
]
}
]
}
}