Skip to content

Commit

Permalink
auto: apply newest APITable commit
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 5, 2023
1 parent 92b406d commit 61386aa
Show file tree
Hide file tree
Showing 4 changed files with 1,278 additions and 95 deletions.
185 changes: 185 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"react-hooks",
"vika",
"react"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/no-var-requires": 0,
"vika/use-t-function": 0,
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/display-name": 0,
"no-extra-boolean-cast": 0,
"no-case-declarations": 0,
"no-multi-spaces": "warn",
"no-prototype-builtins": 0,
// Direct use of built-in functions on the prototype chain is not allowed
"@typescript-eslint/ban-types": 0,
"jsx-a11y/anchor-is-valid": 0,
"prefer-spread": 0,
"no-async-promise-executor": 0,
// Promises are not allowed to wrap async execution functions
"prefer-rest-params": 0,
// replace arguments with rest
"@typescript-eslint/no-inferrable-types": 0,
"no-empty-function": "off",
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-non-null-asserted-optional-chain": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/no-non-null-assertion": 0,
// Do not allow the use of ts! make assertion
"@typescript-eslint/no-explicit-any": 0,
// any is not allowed
"semi": "off",
"@typescript-eslint/semi": 1,
"comma-dangle": [
"warn",
"only-multiline"
],
"max-len": [
// The maximum number of characters allowed on a single line
"warn",
{
"code": 150
}
],
"no-console": 0,
"no-debugger": 1,
"no-empty": [
"error",
{
"allowEmptyCatch": true
}
],
// Whether spaces are allowed before the parentheses of the function
"space-before-function-paren": [
"warn",
"never"
],
"@typescript-eslint/naming-convention": [
"warn",
{
"selector": "enumMember",
"format": [
"PascalCase",
"UPPER_CASE"
]
},
{
"selector": "interface",
"prefix": [
"I"
],
"format": [
"PascalCase"
]
},
{
"selector": "typeLike",
// "prefix": [
// "I"
// ],
"format": [
"PascalCase"
]
},
{
"selector": "variable",
"format": [
"camelCase",
"UPPER_CASE",
"PascalCase"
],
"leadingUnderscore": "allow",
// variable names start with _
"trailingUnderscore": "forbid"
// variable names end with _
},
{
"selector": "parameter",
"format": [
"camelCase",
"PascalCase"
],
"leadingUnderscore": "allow"
}
],
"react/self-closing-comp": [
"warn",
{
"component": true,
"html": true
}
],
"react/jsx-equals-spacing": [
2,
"never"
],
"react/jsx-wrap-multilines": 0,
"no-fallthrough": 1,
"no-unused-expressions": 0,
// disallow unused expressions
"quote-props": [
"warn",
"as-needed"
],
"quotes": [
"warn",
"single",
{
"avoidEscape": true
}
],
"no-multiple-empty-lines": [
"warn",
{
"max": 1,
"maxEOF": 1
}
],
"react/jsx-boolean-value": [
"warn",
"never"
],
"indent": [
"warn",
2,
{
"SwitchCase": 1,
"VariableDeclarator": "first",
"MemberExpression": 1,
"flatTernaryExpressions": false
}
],
"no-inner-declarations": 0,
// "default-case": 1, // requires a default case in the switch statement
"no-else-return": 1,
// Prohibit else in the if statement after return
"array-bracket-spacing": 1,
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "none"
}
],
"require-await": 2,
"@typescript-eslint/ban-ts-comment": 0,
// object
"object-curly-spacing": [
"warn",
"always",
{
"objectsInObjects": false
}
]
}
}
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.1.15",
"version": "1.1.16",
"description": "my apitable widget chart",
"engines": {
"node": ">=8.x"
Expand All @@ -26,6 +26,14 @@
"react": "*",
"react-dom": "*"
},
"devDependencies": {
"eslint": "7.32.0",
"@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-vika": "0.0.1"
},
"dependencies": {
"@antv/g2plot": "^2.3.39",
"@rjsf/core": "^2.4.0",
Expand Down
Loading

0 comments on commit 61386aa

Please sign in to comment.