Initial commit - Todo app frontend
This commit is contained in:
21
node_modules/eslint-plugin-react-hooks/LICENSE
generated
vendored
Normal file
21
node_modules/eslint-plugin-react-hooks/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
152
node_modules/eslint-plugin-react-hooks/README.md
generated
vendored
Normal file
152
node_modules/eslint-plugin-react-hooks/README.md
generated
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
# `eslint-plugin-react-hooks`
|
||||
|
||||
The official ESLint plugin for [React](https://react.dev) which enforces the [Rules of React](https://react.dev/reference/eslint-plugin-react-hooks) and other best practices.
|
||||
|
||||
## Installation
|
||||
|
||||
Assuming you already have ESLint installed, run:
|
||||
|
||||
```sh
|
||||
# npm
|
||||
npm install eslint-plugin-react-hooks --save-dev
|
||||
|
||||
# yarn
|
||||
yarn add eslint-plugin-react-hooks --dev
|
||||
```
|
||||
|
||||
### Flat Config (eslint.config.js|ts)
|
||||
|
||||
Add the `recommended` config for all recommended rules:
|
||||
|
||||
```js
|
||||
// eslint.config.js
|
||||
import reactHooks from 'eslint-plugin-react-hooks';
|
||||
import { defineConfig } from 'eslint/config';
|
||||
|
||||
export default defineConfig([
|
||||
reactHooks.configs.flat.recommended,
|
||||
]);
|
||||
```
|
||||
|
||||
If you want to try bleeding edge experimental compiler rules, use `recommended-latest`.
|
||||
|
||||
```js
|
||||
// eslint.config.js
|
||||
import reactHooks from 'eslint-plugin-react-hooks';
|
||||
import { defineConfig } from 'eslint/config';
|
||||
|
||||
export default defineConfig([
|
||||
reactHooks.configs.flat['recommended-latest'],
|
||||
]);
|
||||
```
|
||||
|
||||
### Legacy Config (.eslintrc)
|
||||
|
||||
If you are still using ESLint below 9.0.0, the `recommended` preset can also be used to enable all recommended rules.
|
||||
|
||||
```js
|
||||
{
|
||||
"extends": ["plugin:react-hooks/recommended"],
|
||||
// ...
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### Custom Configuration
|
||||
|
||||
If you want more fine-grained configuration, you can instead choose to enable specific rules. However, we strongly encourage using the recommended presets — see above — so that you will automatically receive new recommended rules as we add them in future versions of the plugin.
|
||||
|
||||
#### Flat Config (eslint.config.js|ts)
|
||||
|
||||
```js
|
||||
import reactHooks from 'eslint-plugin-react-hooks';
|
||||
|
||||
export default [
|
||||
{
|
||||
files: ['**/*.{js,jsx}'],
|
||||
plugins: { 'react-hooks': reactHooks },
|
||||
// ...
|
||||
rules: {
|
||||
// Core hooks rules
|
||||
'react-hooks/rules-of-hooks': 'error',
|
||||
'react-hooks/exhaustive-deps': 'warn',
|
||||
|
||||
// React Compiler rules
|
||||
'react-hooks/config': 'error',
|
||||
'react-hooks/error-boundaries': 'error',
|
||||
'react-hooks/component-hook-factories': 'error',
|
||||
'react-hooks/gating': 'error',
|
||||
'react-hooks/globals': 'error',
|
||||
'react-hooks/immutability': 'error',
|
||||
'react-hooks/preserve-manual-memoization': 'error',
|
||||
'react-hooks/purity': 'error',
|
||||
'react-hooks/refs': 'error',
|
||||
'react-hooks/set-state-in-effect': 'error',
|
||||
'react-hooks/set-state-in-render': 'error',
|
||||
'react-hooks/static-components': 'error',
|
||||
'react-hooks/unsupported-syntax': 'warn',
|
||||
'react-hooks/use-memo': 'error',
|
||||
'react-hooks/incompatible-library': 'warn',
|
||||
}
|
||||
},
|
||||
];
|
||||
```
|
||||
|
||||
#### Legacy Config (.eslintrc)
|
||||
```js
|
||||
{
|
||||
"plugins": [
|
||||
// ...
|
||||
"react-hooks"
|
||||
],
|
||||
"rules": {
|
||||
// ...
|
||||
// Core hooks rules
|
||||
"react-hooks/rules-of-hooks": "error",
|
||||
"react-hooks/exhaustive-deps": "warn",
|
||||
|
||||
// React Compiler rules
|
||||
"react-hooks/config": "error",
|
||||
"react-hooks/error-boundaries": "error",
|
||||
"react-hooks/component-hook-factories": "error",
|
||||
"react-hooks/gating": "error",
|
||||
"react-hooks/globals": "error",
|
||||
"react-hooks/immutability": "error",
|
||||
"react-hooks/preserve-manual-memoization": "error",
|
||||
"react-hooks/purity": "error",
|
||||
"react-hooks/refs": "error",
|
||||
"react-hooks/set-state-in-effect": "error",
|
||||
"react-hooks/set-state-in-render": "error",
|
||||
"react-hooks/static-components": "error",
|
||||
"react-hooks/unsupported-syntax": "warn",
|
||||
"react-hooks/use-memo": "error",
|
||||
"react-hooks/incompatible-library": "warn"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Advanced Configuration
|
||||
|
||||
`exhaustive-deps` can be configured to validate dependencies of custom Hooks with the `additionalHooks` option.
|
||||
This option accepts a regex to match the names of custom Hooks that have dependencies.
|
||||
|
||||
```js
|
||||
{
|
||||
rules: {
|
||||
// ...
|
||||
"react-hooks/exhaustive-deps": ["warn", {
|
||||
additionalHooks: "(useMyCustomHook|useMyOtherCustomHook)"
|
||||
}]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
We suggest to use this option **very sparingly, if at all**. Generally saying, we recommend most custom Hooks to not use the dependencies argument, and instead provide a higher-level API that is more focused around a specific use case.
|
||||
|
||||
## Valid and Invalid Examples
|
||||
|
||||
Please refer to the [Rules of Hooks](https://react.dev/reference/rules/rules-of-hooks) documentation to learn more about this rule.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
98
node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.d.ts
generated
vendored
Normal file
98
node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.d.ts
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
import * as estree from 'estree';
|
||||
import { Rule, Linter } from 'eslint';
|
||||
|
||||
type ReactHooksFlatConfig = {
|
||||
plugins: {
|
||||
react: any;
|
||||
};
|
||||
rules: Linter.RulesRecord;
|
||||
};
|
||||
declare const plugin: {
|
||||
meta: {
|
||||
name: string;
|
||||
version: string;
|
||||
};
|
||||
rules: {
|
||||
'exhaustive-deps': {
|
||||
meta: {
|
||||
type: "suggestion";
|
||||
docs: {
|
||||
description: string;
|
||||
recommended: true;
|
||||
url: string;
|
||||
};
|
||||
fixable: "code";
|
||||
hasSuggestions: true;
|
||||
schema: {
|
||||
type: "object";
|
||||
additionalProperties: false;
|
||||
enableDangerousAutofixThisMayCauseInfiniteLoops: boolean;
|
||||
properties: {
|
||||
additionalHooks: {
|
||||
type: "string";
|
||||
};
|
||||
enableDangerousAutofixThisMayCauseInfiniteLoops: {
|
||||
type: "boolean";
|
||||
};
|
||||
experimental_autoDependenciesHooks: {
|
||||
type: "array";
|
||||
items: {
|
||||
type: "string";
|
||||
};
|
||||
};
|
||||
requireExplicitEffectDeps: {
|
||||
type: "boolean";
|
||||
};
|
||||
};
|
||||
}[];
|
||||
};
|
||||
create(context: Rule.RuleContext): {
|
||||
CallExpression: (node: estree.CallExpression) => void;
|
||||
};
|
||||
};
|
||||
'rules-of-hooks': {
|
||||
meta: {
|
||||
type: "problem";
|
||||
docs: {
|
||||
description: string;
|
||||
recommended: true;
|
||||
url: string;
|
||||
};
|
||||
schema: {
|
||||
type: "object";
|
||||
additionalProperties: false;
|
||||
properties: {
|
||||
additionalHooks: {
|
||||
type: "string";
|
||||
};
|
||||
};
|
||||
}[];
|
||||
};
|
||||
create(context: Rule.RuleContext): {
|
||||
'*'(node: any): void;
|
||||
'*:exit'(node: any): void;
|
||||
CallExpression(node: estree.CallExpression & Rule.NodeParentExtension): void;
|
||||
Identifier(node: estree.Identifier & Rule.NodeParentExtension): void;
|
||||
'CallExpression:exit'(node: estree.CallExpression & Rule.NodeParentExtension): void;
|
||||
FunctionDeclaration(node: estree.FunctionDeclaration & Rule.NodeParentExtension): void;
|
||||
ArrowFunctionExpression(node: estree.ArrowFunctionExpression & Rule.NodeParentExtension): void;
|
||||
};
|
||||
};
|
||||
};
|
||||
configs: {
|
||||
recommended: {
|
||||
plugins: string[];
|
||||
rules: Linter.RulesRecord;
|
||||
};
|
||||
'recommended-latest': {
|
||||
plugins: string[];
|
||||
rules: Linter.RulesRecord;
|
||||
};
|
||||
flat: {
|
||||
recommended: ReactHooksFlatConfig;
|
||||
"recommended-latest": ReactHooksFlatConfig;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
export { plugin as default };
|
||||
58309
node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js
generated
vendored
Normal file
58309
node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
58134
node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js
generated
vendored
Normal file
58134
node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10
node_modules/eslint-plugin-react-hooks/index.d.ts
generated
vendored
Normal file
10
node_modules/eslint-plugin-react-hooks/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import reactHooks from './cjs/eslint-plugin-react-hooks';
|
||||
|
||||
export = reactHooks;
|
||||
26
node_modules/eslint-plugin-react-hooks/index.js
generated
vendored
Normal file
26
node_modules/eslint-plugin-react-hooks/index.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
// TODO: this doesn't make sense for an ESLint rule.
|
||||
// We need to fix our build process to not create bundles for "raw" packages like this.
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./cjs/eslint-plugin-react-hooks.production.js');
|
||||
} else {
|
||||
module.exports = require('./cjs/eslint-plugin-react-hooks.development.js');
|
||||
}
|
||||
|
||||
// Hint to Node’s cjs-module-lexer to make named imports work
|
||||
// https://github.com/facebook/react/issues/34801#issuecomment-3433478810
|
||||
// eslint-disable-next-line ft-flow/no-unused-expressions
|
||||
0 &&
|
||||
(module.exports = {
|
||||
meta: true,
|
||||
rules: true,
|
||||
configs: true,
|
||||
});
|
||||
68
node_modules/eslint-plugin-react-hooks/package.json
generated
vendored
Normal file
68
node_modules/eslint-plugin-react-hooks/package.json
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"name": "eslint-plugin-react-hooks",
|
||||
"description": "ESLint rules for React Hooks",
|
||||
"version": "7.0.1",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/facebook/react.git",
|
||||
"directory": "packages/eslint-plugin-react-hooks"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"README.md",
|
||||
"cjs",
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"eslint",
|
||||
"eslint-plugin",
|
||||
"eslintplugin",
|
||||
"react"
|
||||
],
|
||||
"scripts": {
|
||||
"build:compiler": "cd ../../compiler && yarn workspace babel-plugin-react-compiler build",
|
||||
"test": "yarn build:compiler && jest",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/facebook/react/issues"
|
||||
},
|
||||
"main": "./index.js",
|
||||
"types": "./index.d.ts",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"homepage": "https://react.dev/",
|
||||
"peerDependencies": {
|
||||
"eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.24.4",
|
||||
"@babel/parser": "^7.24.4",
|
||||
"hermes-parser": "^0.25.1",
|
||||
"zod": "^3.25.0 || ^4.0.0",
|
||||
"zod-validation-error": "^3.5.0 || ^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/eslint-parser": "^7.11.4",
|
||||
"@babel/preset-typescript": "^7.26.0",
|
||||
"@babel/types": "^7.19.0",
|
||||
"@tsconfig/strictest": "^2.0.5",
|
||||
"@types/eslint": "^9.6.1",
|
||||
"@types/estree": "^1.0.6",
|
||||
"@types/estree-jsx": "^1.0.5",
|
||||
"@types/node": "^20.2.5",
|
||||
"@typescript-eslint/parser-v2": "npm:@typescript-eslint/parser@^2.26.0",
|
||||
"@typescript-eslint/parser-v3": "npm:@typescript-eslint/parser@^3.10.0",
|
||||
"@typescript-eslint/parser-v4": "npm:@typescript-eslint/parser@^4.1.0",
|
||||
"@typescript-eslint/parser-v5": "npm:@typescript-eslint/parser@^5.62.0",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"eslint-v7": "npm:eslint@^7.7.0",
|
||||
"eslint-v8": "npm:eslint@^8.57.1",
|
||||
"eslint-v9": "npm:eslint@^9.0.0",
|
||||
"jest": "^29.5.0",
|
||||
"typescript": "^5.4.3"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user