Fix tests server

This commit is contained in:
Charles Bochet 2023-09-17 08:41:46 -07:00
parent 7fa80c5f71
commit dba6f93826
5 changed files with 7 additions and 16 deletions

View File

@ -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);',
},
],
});

View File

@ -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',

View File

@ -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",

View File

@ -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"