eslint-plugin-atomic-redesign
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "eslint-plugin-atomic-redesign", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "ESLint rules for Atomic ReDesigned projects.", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/recruit-tech/eslint-plugin-atomic-redesign.git" | ||
}, | ||
"keywords": [ | ||
@@ -6,0 +10,0 @@ "eslint", |
# eslint-plugin-atomic-redesign | ||
[![npm version](https://badge.fury.io/js/eslint-plugin-atomic-redesign.svg)](https://badge.fury.io/js/eslint-plugin-atomic-redesign) | ||
ESLint rules for [Atomic ReDesign](https://zenn.dev/takepepe/articles/atomic-redesign)ed projects. | ||
@@ -68,3 +70,3 @@ | ||
// at src/components/atoms/foo/index.tsx | ||
import Bar from "../../molecules/bar/index.tsx"; | ||
import Bar from '../../molecules/bar/index.tsx'; | ||
``` | ||
@@ -76,3 +78,3 @@ | ||
// at src/components/molecules/bar/index.tsx | ||
import Foo from "../../atoms/foo/index.tsx"; | ||
import Foo from '../../atoms/foo/index.tsx'; | ||
``` | ||
@@ -99,7 +101,7 @@ | ||
| Property Name | Description | Default Value | | ||
| :------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------ | | ||
| includeSourceFilePatterns | A set of each component type (atoms and molecules) and a RegExp pattern. If the file path matches each pattern, the rule determines that the file contains components of that type and checks the import statement. | [here](./lib/rules/importDependencies.ts#L28-L33) | | ||
| excludeSourceFilePatterns | An array of RegExp patterns. File paths that match any pattern are excluded from the check. | [here](./lib/rules/importDependencies.ts#L34) | | ||
| importPatterns | A set of each component type (atoms and molecules) and a RegExp pattern. If the path portion of the import statement matches these patterns, the rule determines that it is loading the corresponding type of component. | [here](./lib/rules/importDependencies.ts#L35-L40) | | ||
| Property Name | Description | Default Value | | ||
| :------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------- | | ||
| includeSourceFilePatterns | A set of each component type (atoms and molecules) and a RegExp pattern. If the file path matches each pattern, the rule determines that the file contains components of that type and checks the import statement. | [here](https://github.com/recruit-tech/eslint-plugin-atomic-redesign/blob/main/lib/rules/importDependencies.ts#L28-L33) | | ||
| excludeSourceFilePatterns | An array of RegExp patterns. File paths that match any pattern are excluded from the check. | [here](https://github.com/recruit-tech/eslint-plugin-atomic-redesign/blob/main/lib/rules/importDependencies.ts#L34) | | ||
| importPatterns | A set of each component type (atoms and molecules) and a RegExp pattern. If the path portion of the import statement matches these patterns, the rule determines that it is loading the corresponding type of component. | [here](https://github.com/recruit-tech/eslint-plugin-atomic-redesign/blob/main/lib/rules/importDependencies.ts#L35-L40) | | ||
@@ -126,7 +128,7 @@ ### Rule: deny-local-state | ||
| Property Name | Description | Default Value | | ||
| :------------------------ | :--------------------------------------------------------------------------------------------- | :---------------------------------------- | | ||
| includeSourceFilePatterns | An array of RegExp patterns that match the name of the file that must not contain local state. | [here](./lib/rules/denyLocalState.ts#L26) | | ||
| excludeSourceFilePatterns | An array of RegExp patterns. File paths that match any pattern are excluded from the check. | [here](./lib/rules/denyLocalState.ts#L27) | | ||
| denyFunctionNames | An array of function names that are considered to be using the local state. | [here](./lib/rules/denyLocalState.ts#L28) | | ||
| Property Name | Description | Default Value | | ||
| :------------------------ | :--------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------- | | ||
| includeSourceFilePatterns | An array of RegExp patterns that match the name of the file that must not contain local state. | [here](https://github.com/recruit-tech/eslint-plugin-atomic-redesign/blob/main/lib/rules/denyLocalState.ts#L26) | | ||
| excludeSourceFilePatterns | An array of RegExp patterns. File paths that match any pattern are excluded from the check. | [here](https://github.com/recruit-tech/eslint-plugin-atomic-redesign/blob/main/lib/rules/denyLocalState.ts#L27) | | ||
| denyFunctionNames | An array of function names that are considered to be using the local state. | [here](https://github.com/recruit-tech/eslint-plugin-atomic-redesign/blob/main/lib/rules/denyLocalState.ts#L28) | | ||
@@ -153,7 +155,7 @@ ### Rule: deny-global-state | ||
| Property Name | Description | Default Value | | ||
| :------------------------ | :---------------------------------------------------------------------------------------------- | :--------------------------------------------- | | ||
| includeSourceFilePatterns | An array of RegExp patterns that match the name of the file that must not contain global state. | [here](./lib/rules/denyGlobalState.ts#L26-L29) | | ||
| excludeSourceFilePatterns | An array of RegExp patterns. File paths that match any pattern are excluded from the check. | [here](./lib/rules/denyGlobalState.ts#L30) | | ||
| denyFunctionNames | An array of function names that are considered to be using the local state. | [here](./lib/rules/denyGlobalState.ts#L31-L39) | | ||
| Property Name | Description | Default Value | | ||
| :------------------------ | :---------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------- | | ||
| includeSourceFilePatterns | An array of RegExp patterns that match the name of the file that must not contain global state. | [here](https://github.com/recruit-tech/eslint-plugin-atomic-redesign/blob/main/lib/rules/denyGlobalState.ts#L26-L29) | | ||
| excludeSourceFilePatterns | An array of RegExp patterns. File paths that match any pattern are excluded from the check. | [here](https://github.com/recruit-tech/eslint-plugin-atomic-redesign/blob/main/lib/rules/denyGlobalState.ts#L30) | | ||
| denyFunctionNames | An array of function names that are considered to be using the local state. | [here](https://github.com/recruit-tech/eslint-plugin-atomic-redesign/blob/main/lib/rules/denyGlobalState.ts#L31-L39) | | ||
@@ -184,8 +186,8 @@ ### Rule: must-use-local-state | ||
| Property Name | Description | Default Value | | ||
| :-------------------- | :------------------------------------------------------------------------------------------------------------ | :------------------------------------------- | | ||
| checkDirectorys | An array of Glob patterns. The rule treats each directory that matches this pattern as a Molecules component. | [here](./lib/rules/mustUseLocalState.ts#L13) | | ||
| checkFilesInDirectory | An array of Glob patterns. The rule only checks files that match this pattern. | [here](./lib/rules/mustUseLocalState.ts#L14) | | ||
| excludeFilePatterns | An array of RegExp patterns. Files with paths that match this pattern are excluded from the check. | [here](./lib/rules/mustUseLocalState.ts#L15) | | ||
| keywords | An array of strings that are considered to be using Local State. | [here](./lib/rules/mustUseLocalState.ts#L16) | | ||
| Property Name | Description | Default Value | | ||
| :-------------------- | :------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------- | | ||
| checkDirectorys | An array of Glob patterns. The rule treats each directory that matches this pattern as a Molecules component. | [here](https://github.com/recruit-tech/eslint-plugin-atomic-redesign/blob/main/lib/rules/mustUseLocalState.ts#L13) | | ||
| checkFilesInDirectory | An array of Glob patterns. The rule only checks files that match this pattern. | [here](https://github.com/recruit-tech/eslint-plugin-atomic-redesign/blob/main/lib/rules/mustUseLocalState.ts#L14) | | ||
| excludeFilePatterns | An array of RegExp patterns. Files with paths that match this pattern are excluded from the check. | [here](https://github.com/recruit-tech/eslint-plugin-atomic-redesign/blob/main/lib/rules/mustUseLocalState.ts#L15) | | ||
| keywords | An array of strings that are considered to be using Local State. | [here](https://github.com/recruit-tech/eslint-plugin-atomic-redesign/blob/main/lib/rules/mustUseLocalState.ts#L16) | | ||
@@ -216,8 +218,8 @@ ### Rule: must-use-global-state | ||
| Property Name | Description | Default Value | | ||
| :-------------------- | :------------------------------------------------------------------------------------------------------------ | :------------------------------------------------ | | ||
| checkDirectorys | An array of Glob patterns. The rule treats each directory that matches this pattern as a Organisms component. | [here](./lib/rules/mustUseGlobalState.ts#L13) | | ||
| checkFilesInDirectory | An array of Glob patterns. The rule only checks files that match this pattern. | [here](./lib/rules/mustUseGlobalState.ts#L14) | | ||
| excludeFilePatterns | An array of RegExp patterns. Files with paths that match this pattern are excluded from the check. | [here](./lib/rules/mustUseGlobalState.ts#L15) | | ||
| keywords | An array of strings that are considered to be using Global State. | [here](./lib/rules/mustUseGlobalState.ts#L16-L25) | | ||
| Property Name | Description | Default Value | | ||
| :-------------------- | :------------------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------- | | ||
| checkDirectorys | An array of Glob patterns. The rule treats each directory that matches this pattern as a Organisms component. | [here](https://github.com/recruit-tech/eslint-plugin-atomic-redesign/blob/main/lib/rules/mustUseGlobalState.ts#L13) | | ||
| checkFilesInDirectory | An array of Glob patterns. The rule only checks files that match this pattern. | [here](https://github.com/recruit-tech/eslint-plugin-atomic-redesign/blob/main/lib/rules/mustUseGlobalState.ts#L14) | | ||
| excludeFilePatterns | An array of RegExp patterns. Files with paths that match this pattern are excluded from the check. | [here](https://github.com/recruit-tech/eslint-plugin-atomic-redesign/blob/main/lib/rules/mustUseGlobalState.ts#L15) | | ||
| keywords | An array of strings that are considered to be using Global State. | [here](https://github.com/recruit-tech/eslint-plugin-atomic-redesign/blob/main/lib/rules/mustUseGlobalState.ts#L16-L25) | | ||
@@ -224,0 +226,0 @@ ### Licence |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
38180
222
1