mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-24 06:48:42 +03:00
Fix tests server
This commit is contained in:
parent
7fa80c5f71
commit
dba6f93826
@ -15,24 +15,24 @@ const ruleTester = new RuleTester({
|
||||
ruleTester.run('matching-state-variable', matchingStateVariableRule, {
|
||||
valid: [
|
||||
{
|
||||
code: 'const myState = useRecoilValue(someAtom);',
|
||||
code: 'const variable = useRecoilValue(variableState);',
|
||||
},
|
||||
{
|
||||
code: 'const [myState, setMyState] = useRecoilState(someAtom);',
|
||||
code: 'const [variable, setVariable] = useRecoilState(variableState);',
|
||||
},
|
||||
],
|
||||
invalid: [
|
||||
{
|
||||
code: 'const myValue = useRecoilValue(someAtom);',
|
||||
code: 'const myValue = useRecoilValue(variableState);',
|
||||
errors: [
|
||||
{
|
||||
messageId: 'invalidVariableName',
|
||||
},
|
||||
],
|
||||
output: 'const some = useRecoilValue(someAtom);',
|
||||
output: 'const variable = useRecoilValue(variableState);',
|
||||
},
|
||||
{
|
||||
code: 'const [myValue, setMyValue] = useRecoilState(someAtom);',
|
||||
code: 'const [myValue, setMyValue] = useRecoilState(variableState);',
|
||||
errors: [
|
||||
{
|
||||
messageId: 'invalidVariableName',
|
||||
@ -41,7 +41,7 @@ ruleTester.run('matching-state-variable', matchingStateVariableRule, {
|
||||
messageId: 'invalidSetterName',
|
||||
},
|
||||
],
|
||||
output: 'const [some, setSome] = useRecoilState(someAtom);',
|
||||
output: 'const [variable, setVariable] = useRecoilState(variableState);',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
@ -5,7 +5,7 @@ module.exports = {
|
||||
tsconfigRootDir : __dirname,
|
||||
sourceType: 'module',
|
||||
},
|
||||
plugins: ['@typescript-eslint/eslint-plugin', 'import', 'unused-imports','twenty-ts'],
|
||||
plugins: ['@typescript-eslint/eslint-plugin', 'import', 'unused-imports'],
|
||||
extends: [
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:prettier/recommended',
|
||||
@ -17,11 +17,6 @@ module.exports = {
|
||||
},
|
||||
ignorePatterns: ['.eslintrc.js', 'src/core/@generated/**'],
|
||||
rules: {
|
||||
'twenty-ts/effect-components': 'error',
|
||||
'twenty-ts/no-hardcoded-colors': 'error',
|
||||
'twenty-ts/matching-state-variable': 'error',
|
||||
'twenty-ts/sort-css-properties-alphabetically': 'error',
|
||||
'twenty-ts/styled-components-prefixed-with-styled': 'error',
|
||||
'@typescript-eslint/interface-name-prefix': 'off',
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
|
@ -108,7 +108,6 @@
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"eslint-plugin-twenty-ts": "file:../packages/eslint-plugin-twenty-ts",
|
||||
"eslint-plugin-unused-imports": "^3.0.0",
|
||||
"jest": "28.1.3",
|
||||
"prettier": "^2.3.2",
|
||||
|
@ -4883,9 +4883,6 @@ eslint-plugin-prettier@^4.0.0:
|
||||
dependencies:
|
||||
prettier-linter-helpers "^1.0.0"
|
||||
|
||||
"eslint-plugin-twenty-ts@file:../packages/eslint-plugin-twenty-ts":
|
||||
version "1.0.1"
|
||||
|
||||
eslint-plugin-unused-imports@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-3.0.0.tgz#d25175b0072ff16a91892c3aa72a09ca3a9e69e7"
|
||||
|
Loading…
Reference in New Issue
Block a user