Skip to content

Commit 9211447

Browse files
authored
Merge pull request #72 from Resgrid/develop
RD-T39 Fixing build
2 parents ada0545 + fe53dcb commit 9211447

88 files changed

Lines changed: 1158 additions & 6016 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
.eslintignorenode_modules
1+
node_modules/
2+
**/node_modules/**
23
__tests__/
34
.vscode/
45
android/
@@ -7,4 +8,10 @@ ios/
78
.expo
89
.expo-shared
910
docs/
10-
cli/
11+
cli/
12+
assets/
13+
scripts/
14+
types/
15+
*.config.js
16+
*.config.ts
17+
env.js

.eslintrc.js

Lines changed: 24 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,42 @@
1-
const path = require('path');
2-
31
module.exports = {
4-
extends: ['expo', 'plugin:tailwindcss/recommended', 'prettier'],
5-
plugins: ['prettier', 'unicorn', '@typescript-eslint', 'unused-imports', 'tailwindcss', 'simple-import-sort', 'eslint-plugin-react-compiler'],
2+
extends: ['prettier'],
3+
plugins: ['prettier', '@typescript-eslint', 'react', 'react-hooks', 'simple-import-sort'],
4+
parser: '@typescript-eslint/parser',
65
parserOptions: {
7-
project: './tsconfig.json',
6+
ecmaFeatures: {
7+
jsx: true,
8+
},
9+
ecmaVersion: 'latest',
10+
sourceType: 'module',
11+
},
12+
settings: {
13+
react: {
14+
version: 'detect',
15+
},
816
},
917
rules: {
1018
'prettier/prettier': 'warn',
11-
'max-params': ['error', 10], // Limit the number of parameters in a function to use object instead
19+
'max-params': ['error', 10],
1220
'max-lines-per-function': ['error', 1500],
1321
'react/display-name': 'off',
1422
'react/no-inline-styles': 'off',
15-
'react/destructuring-assignment': 'off', // Vscode doesn't support automatically destructuring, it's a pain to add a new variable
16-
'react/require-default-props': 'off', // Allow non-defined react props as undefined
17-
'@typescript-eslint/comma-dangle': 'off', // Avoid conflict rule between Eslint and Prettier
23+
'react/destructuring-assignment': 'off',
24+
'react/require-default-props': 'off',
25+
'react/react-in-jsx-scope': 'off',
26+
'react/no-unstable-nested-components': ['warn', { allowAsProps: true }],
27+
'react-hooks/rules-of-hooks': 'error',
28+
'react-hooks/exhaustive-deps': 'warn',
29+
'@typescript-eslint/comma-dangle': 'off',
1830
'@typescript-eslint/consistent-type-imports': [
1931
'warn',
2032
{
2133
prefer: 'type-imports',
2234
fixStyle: 'inline-type-imports',
2335
disallowTypeAnnotations: true,
2436
},
25-
], // Ensure `import type` is used when it's necessary
26-
'import/prefer-default-export': 'off', // Named export is easier to refactor automatically
27-
'import/no-cycle': ['error', { maxDepth: '∞' }],
28-
'tailwindcss/classnames-order': [
29-
'warn',
30-
{
31-
officialSorting: true,
32-
},
33-
], // Follow the same ordering as the official plugin `prettier-plugin-tailwindcss`
34-
'simple-import-sort/imports': 'error', // Import configuration for `eslint-plugin-simple-import-sort`
35-
'simple-import-sort/exports': 'error', // Export configuration for `eslint-plugin-simple-import-sort`
36-
'@typescript-eslint/no-unused-vars': 'off',
37-
'tailwindcss/no-custom-classname': 'off',
38-
'unused-imports/no-unused-imports': 'off',
39-
'unused-imports/no-unused-vars': [
40-
'off',
41-
{
42-
argsIgnorePattern: '^_',
43-
varsIgnorePattern: '^_',
44-
caughtErrorsIgnorePattern: '^_',
45-
},
4637
],
38+
'simple-import-sort/imports': 'error',
39+
'simple-import-sort/exports': 'error',
40+
'@typescript-eslint/no-unused-vars': 'off',
4741
},
48-
overrides: [
49-
// Configuration for translations files (i18next)
50-
{
51-
files: ['src/translations/*.json'],
52-
extends: ['plugin:i18n-json/recommended'],
53-
rules: {
54-
'i18n-json/valid-message-syntax': [
55-
2,
56-
{
57-
syntax: path.resolve('./scripts/i18next-syntax-validation.js'),
58-
},
59-
],
60-
'i18n-json/valid-json': 2,
61-
'i18n-json/sorted-keys': [
62-
2,
63-
{
64-
order: 'asc',
65-
indentSpaces: 2,
66-
},
67-
],
68-
'i18n-json/identical-keys': [
69-
2,
70-
{
71-
filePath: path.resolve('./src/translations/en.json'),
72-
},
73-
],
74-
'prettier/prettier': [
75-
0,
76-
{
77-
singleQuote: true,
78-
endOfLine: 'auto',
79-
},
80-
],
81-
},
82-
},
83-
{
84-
// Configuration for testing files
85-
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
86-
extends: ['plugin:testing-library/react'],
87-
},
88-
],
8942
};

0 commit comments

Comments
 (0)