@bigbinary/neetoui 3.2.62 → 3.2.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +26 -18
- package/.eslint-rules/imports/enforced.js +20 -0
- package/.eslint-rules/imports/order.js +15 -0
- package/.eslint-rules/overrides.js +12 -0
- package/.eslint-rules/react.js +34 -0
- package/formik.js +1 -1
- package/index.js +1 -1
- package/layouts.js +1 -1
- package/package.json +4 -2
- package/tests/Accordion.test.js +102 -0
package/.circleci/config.yml
CHANGED
|
@@ -1,23 +1,31 @@
|
|
|
1
|
-
# This config is equivalent to both the '.circleci/extended/orb-free.yml' and the base '.circleci/config.yml'
|
|
2
1
|
version: 2.1
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
# Invoke jobs via workflows
|
|
10
|
-
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
|
|
2
|
+
aliases:
|
|
3
|
+
- &test_environment
|
|
4
|
+
docker:
|
|
5
|
+
# replace with your preferred image
|
|
6
|
+
- image: circleci/node:14
|
|
11
7
|
jobs:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
"Snapshot Test":
|
|
9
|
+
<<: *test_environment
|
|
10
|
+
steps:
|
|
11
|
+
- checkout
|
|
12
|
+
- run: yarn install
|
|
13
|
+
- run:
|
|
14
|
+
name: Run Snapshot Tests
|
|
15
|
+
command: yarn chromatic test --exit-zero-on-changes --project-token $CHROMATIC_PROJECT_TOKEN
|
|
16
|
+
"Unit Test":
|
|
17
|
+
<<: *test_environment
|
|
18
|
+
steps:
|
|
19
|
+
- checkout
|
|
20
|
+
- run: yarn install
|
|
21
|
+
- run:
|
|
22
|
+
name: Run Unit Tests
|
|
23
|
+
command: yarn test
|
|
19
24
|
|
|
20
25
|
workflows:
|
|
21
|
-
|
|
26
|
+
neetoui-tests:
|
|
22
27
|
jobs:
|
|
23
|
-
-
|
|
28
|
+
- "Snapshot Test"
|
|
29
|
+
- "Unit Test"
|
|
30
|
+
|
|
31
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
rules: {
|
|
3
|
+
// not-auto-fixable: Prefer a default export if module exports a single name.
|
|
4
|
+
"import/prefer-default-export": "off",
|
|
5
|
+
// not-auto-fixable: Forbid a module from importing a module with a dependency path back to itself.
|
|
6
|
+
"import/no-cycle": ["error", { maxDepth: 1, ignoreExternal: true }],
|
|
7
|
+
// not-auto-fixable: Prevent unnecessary path segments in import and require statements.
|
|
8
|
+
"import/no-useless-path-segments": ["error", { noUselessIndex: true }],
|
|
9
|
+
// not-auto-fixable: Report any invalid exports, i.e. re-export of the same name.
|
|
10
|
+
"import/export": "error",
|
|
11
|
+
// not-auto-fixable: Forbid the use of mutable exports with var or let.
|
|
12
|
+
"import/no-mutable-exports": "error",
|
|
13
|
+
// not-auto-fixable: Ensure all imports appear before other statements.
|
|
14
|
+
"import/first": "error",
|
|
15
|
+
// not-auto-fixable: Ensure all exports appear after other statements.
|
|
16
|
+
"import/exports-last": "error",
|
|
17
|
+
// auto-fixable: Enforce a newline after import statements.
|
|
18
|
+
"import/newline-after-import": ["error", { count: 1 }]
|
|
19
|
+
}
|
|
20
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
rules: {
|
|
3
|
+
// auto-fixable: Enforce a convention in module import order - we enforce https://www.bigbinary.com/react-best-practices/sort-import-statements
|
|
4
|
+
"import/order": [
|
|
5
|
+
"error",
|
|
6
|
+
{
|
|
7
|
+
"newlines-between": "always",
|
|
8
|
+
alphabetize: { order: "asc", caseInsensitive: true },
|
|
9
|
+
warnOnUnassignedImports: true,
|
|
10
|
+
// Ignore react imports so that they're always ordered to the top of the file.
|
|
11
|
+
pathGroupsExcludedImportTypes: ["react", "react-native"],
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// Currently we are using this section for excluding certain files from certain rules.
|
|
3
|
+
overrides: [
|
|
4
|
+
{
|
|
5
|
+
files: [".eslintrc.js", "*.json"],
|
|
6
|
+
rules: {
|
|
7
|
+
"import/order": "off",
|
|
8
|
+
"react-hooks/rules-of-hooks": "off",
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
rules: {
|
|
3
|
+
// not-auto-fixable: Prevent missing props validation in a React component definition.
|
|
4
|
+
"react/prop-types": "off",
|
|
5
|
+
// not-auto-fixable: Detect unescaped HTML entities, which might represent malformed tags.
|
|
6
|
+
"react/no-unescaped-entities": "off",
|
|
7
|
+
// not-auto-fixable: Prevent missing displayName in a React component definition. Useful when using React extensions in browser and checking for component name.
|
|
8
|
+
"react/display-name": "error",
|
|
9
|
+
// not-auto-fixable: Reports when this.state is accessed within setState.
|
|
10
|
+
"react/no-access-state-in-setstate": "error",
|
|
11
|
+
// not-auto-fixable: Prevent usage of dangerous JSX props. Currently jam3 plugin will take care of handling this.
|
|
12
|
+
"react/no-danger": "off",
|
|
13
|
+
// not-auto-fixable: Report when a DOM element is using both children and dangerouslySetInnerHTML.
|
|
14
|
+
"react/no-danger-with-children": "warn",
|
|
15
|
+
// not-auto-fixable: Prevent definitions of unused prop types.
|
|
16
|
+
"react/no-unused-prop-types": "error",
|
|
17
|
+
// not-auto-fixable: Report missing key props in iterators/collection literals. Important rule!
|
|
18
|
+
"react/jsx-key": "error",
|
|
19
|
+
// not-auto-fixable: Enforce no duplicate props.
|
|
20
|
+
"react/jsx-no-duplicate-props": "error",
|
|
21
|
+
// not-auto-fixable: Disallow undeclared variables in JSX.
|
|
22
|
+
"react/jsx-no-undef": "error",
|
|
23
|
+
// not-auto-fixable: Enforce PascalCase for user-defined JSX components.
|
|
24
|
+
"react/jsx-pascal-case": ["error", { allowNamespace: true }],
|
|
25
|
+
// not-auto-fixable: Prevent React to be incorrectly marked as unused.
|
|
26
|
+
"react/jsx-uses-react": "error",
|
|
27
|
+
// not-auto-fixable: Prevent variables used in JSX to be marked as unused.
|
|
28
|
+
"react/jsx-uses-vars": "error",
|
|
29
|
+
// not-auto-fixable: Ensures https://reactjs.org/docs/hooks-rules.html.
|
|
30
|
+
"react-hooks/rules-of-hooks": "error",
|
|
31
|
+
// not-auto-fixable: Ensures https://reactjs.org/docs/hooks-rules.html - Checks effect dependencies.
|
|
32
|
+
"react-hooks/exhaustive-deps": "warn",
|
|
33
|
+
},
|
|
34
|
+
};
|