Skip to content

Commit 93218cb

Browse files
author
Olavo Parno
committed
Enhance ESLint configuration and update dependencies
This commit introduces several improvements to the ESLint configuration and updates various dependencies across the project. Key changes include: - Added `ignorePatterns` to the ESLint configuration to exclude files in the `example` directory. - Introduced a new rule for `import/no-extraneous-dependencies` to better manage development dependencies. - Updated `package.json` to reflect new versions for several dependencies, including React and testing libraries. - Removed the `package-lock.json` file to switch to Yarn for dependency management, updating the `yarn.lock` file accordingly. - Updated the example project to use the latest React version and adjusted its dependencies. These changes aim to improve code quality, maintainability, and compatibility with the latest libraries.
1 parent 60e596c commit 93218cb

File tree

15 files changed

+13560
-46469
lines changed

15 files changed

+13560
-46469
lines changed

.eslintrc.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module.exports = {
2626
},
2727
},
2828
},
29+
ignorePatterns: ['example/**/*'],
2930
rules: {
3031
'react-hooks/rules-of-hooks': 'error',
3132
'react-hooks/exhaustive-deps': 'error',
@@ -36,6 +37,23 @@ module.exports = {
3637
'import/extensions': ['error', 'never'],
3738
'import/prefer-default-export': 'off',
3839
'import/no-unresolved': ['error', { ignore: ['react-hooks-fetch'] }],
40+
'import/no-extraneous-dependencies': [
41+
'error',
42+
{
43+
devDependencies: [
44+
'**/*.test.ts',
45+
'**/*.test.tsx',
46+
'**/__tests__/**',
47+
'**/test/**',
48+
'**/tests/**',
49+
'**/jest.config.js',
50+
'**/jest.setup.js',
51+
'**/test-utils/**',
52+
'**/testing-library/**',
53+
'@testing-library/**',
54+
],
55+
},
56+
],
3957
camelcase: [
4058
'error',
4159
{

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
| Statements | Branches | Functions | Lines |
1212
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------- |
13-
| ![Statements](https://img.shields.io/badge/statements-100%25-brightgreen.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-100%25-brightgreen.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-100%25-brightgreen.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-100%25-brightgreen.svg?style=flat) |
13+
| ![Statements](https://img.shields.io/badge/statements-80.95%25-yellow.svg) | ![Branches](https://img.shields.io/badge/branches-78.79%25-red.svg) | ![Functions](https://img.shields.io/badge/functions-100%25-brightgreen.svg) | ![Lines](https://img.shields.io/badge/lines-84.81%25-yellow.svg) |
1414

1515
## Table of Contents
1616

0 commit comments

Comments
 (0)