@papillonarts/setup 0.16.0 → 0.18.0
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/eslint/index.d.mts +3 -2
- package/eslint/index.d.mts.map +1 -1
- package/eslint/index.mjs +111 -137
- package/jest/config.d.ts.map +1 -1
- package/jest/config.js +3 -1
- package/package.json +3 -3
package/eslint/index.d.mts
CHANGED
package/eslint/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/eslint/index.mjs"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/eslint/index.mjs"],"names":[],"mappings":"AAsBA;;8CA+HC"}
|
package/eslint/index.mjs
CHANGED
|
@@ -20,157 +20,131 @@ const compat = new FlatCompat({
|
|
|
20
20
|
allConfig: js.configs.all,
|
|
21
21
|
})
|
|
22
22
|
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
'**/package-lock.json',
|
|
39
|
-
'packages/components/package-lock.json',
|
|
40
|
-
'packages/components/build',
|
|
41
|
-
'packages/components/node_modules',
|
|
42
|
-
'packages/CSS/package-lock.json',
|
|
43
|
-
'packages/CSS/build',
|
|
44
|
-
'packages/CSS/node_modules',
|
|
45
|
-
'packages/CSS/src/primer',
|
|
46
|
-
'packages/library/package-lock.json',
|
|
47
|
-
'packages/library/build',
|
|
48
|
-
'packages/library/node_modules',
|
|
49
|
-
'packages/setup/package-lock.json',
|
|
50
|
-
'packages/setup/build',
|
|
51
|
-
'packages/setup/node_modules',
|
|
52
|
-
]),
|
|
53
|
-
{
|
|
54
|
-
extends: fixupConfigRules(
|
|
55
|
-
compat.extends(
|
|
56
|
-
'eslint:recommended',
|
|
57
|
-
'plugin:import/errors',
|
|
58
|
-
'plugin:import/warnings',
|
|
59
|
-
'plugin:react/recommended',
|
|
60
|
-
'plugin:jsx-a11y/recommended',
|
|
61
|
-
'plugin:jest/recommended',
|
|
62
|
-
'prettier',
|
|
63
|
-
'plugin:@typescript-eslint/stylistic-type-checked',
|
|
23
|
+
export function getESLintSetup({ eslintIgnores }) {
|
|
24
|
+
return defineConfig([
|
|
25
|
+
globalIgnores(eslintIgnores),
|
|
26
|
+
{
|
|
27
|
+
extends: fixupConfigRules(
|
|
28
|
+
compat.extends(
|
|
29
|
+
'eslint:recommended',
|
|
30
|
+
'plugin:import/errors',
|
|
31
|
+
'plugin:import/warnings',
|
|
32
|
+
'plugin:react/recommended',
|
|
33
|
+
'plugin:jsx-a11y/recommended',
|
|
34
|
+
'plugin:jest/recommended',
|
|
35
|
+
'prettier',
|
|
36
|
+
'plugin:@typescript-eslint/stylistic-type-checked',
|
|
37
|
+
),
|
|
64
38
|
),
|
|
65
|
-
),
|
|
66
39
|
|
|
67
|
-
|
|
40
|
+
files: ['**/*.ts', '**/*.tsx'],
|
|
68
41
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
languageOptions: {
|
|
78
|
-
globals: {
|
|
79
|
-
...globals.amd,
|
|
80
|
-
...globals.browser,
|
|
81
|
-
...globals.commonjs,
|
|
82
|
-
...globals.jasmine,
|
|
83
|
-
...globals.jest,
|
|
84
|
-
...globals.mocha,
|
|
85
|
-
...globals.node,
|
|
86
|
-
document: false,
|
|
87
|
-
expect: false,
|
|
88
|
-
jest: false,
|
|
89
|
-
jsdom: true,
|
|
90
|
-
renderMount: false,
|
|
91
|
-
renderShallow: false,
|
|
42
|
+
plugins: {
|
|
43
|
+
react: fixupPluginRules(react),
|
|
44
|
+
'react-hooks': fixupPluginRules(reactHooks),
|
|
45
|
+
'jsx-a11y': fixupPluginRules(jsxA11Y),
|
|
46
|
+
jest: fixupPluginRules(jest),
|
|
47
|
+
prettier,
|
|
92
48
|
},
|
|
93
49
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
50
|
+
languageOptions: {
|
|
51
|
+
globals: {
|
|
52
|
+
...globals.amd,
|
|
53
|
+
...globals.browser,
|
|
54
|
+
...globals.commonjs,
|
|
55
|
+
...globals.jasmine,
|
|
56
|
+
...globals.jest,
|
|
57
|
+
...globals.mocha,
|
|
58
|
+
...globals.node,
|
|
59
|
+
document: false,
|
|
60
|
+
expect: false,
|
|
61
|
+
jest: false,
|
|
62
|
+
jsdom: true,
|
|
63
|
+
renderMount: false,
|
|
64
|
+
renderShallow: false,
|
|
101
65
|
},
|
|
102
66
|
|
|
103
|
-
|
|
104
|
-
|
|
67
|
+
parser: tsParser,
|
|
68
|
+
ecmaVersion: 16,
|
|
69
|
+
sourceType: 'commonjs',
|
|
70
|
+
|
|
71
|
+
parserOptions: {
|
|
72
|
+
ecmaFeatures: {
|
|
73
|
+
jsx: true,
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
projectService: {
|
|
77
|
+
allowDefaultProject: ['*.js', '*.jsx', '*.ts', '*.tsx'],
|
|
78
|
+
},
|
|
105
79
|
},
|
|
106
80
|
},
|
|
107
|
-
},
|
|
108
81
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
82
|
+
settings: {
|
|
83
|
+
'import/resolver': {
|
|
84
|
+
alias: {
|
|
85
|
+
map: [['@papillonarts/components', '@papillonarts/components/build']],
|
|
86
|
+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
node: {
|
|
90
|
+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
91
|
+
},
|
|
114
92
|
},
|
|
115
93
|
|
|
116
|
-
|
|
117
|
-
|
|
94
|
+
react: {
|
|
95
|
+
version: '19.2.0',
|
|
118
96
|
},
|
|
119
97
|
},
|
|
120
98
|
|
|
121
|
-
|
|
122
|
-
|
|
99
|
+
rules: {
|
|
100
|
+
'import/named': 2,
|
|
101
|
+
|
|
102
|
+
'import/no-extraneous-dependencies': [
|
|
103
|
+
0,
|
|
104
|
+
{
|
|
105
|
+
devDependencies: ['**/*.test.js', '**/*.story.js', '**/*.test.ts', '**/*.story.tsx'],
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
|
|
109
|
+
'import/prefer-default-export': 'off',
|
|
110
|
+
'import/no-relative-packages': 'off',
|
|
111
|
+
'jsx-a11y/accessible-emoji': 0,
|
|
112
|
+
'prettier/prettier': 'error',
|
|
113
|
+
'react-hooks/exhaustive-deps': 'warn',
|
|
114
|
+
'react-hooks/rules-of-hooks': 'error',
|
|
115
|
+
'react/jsx-boolean-value': 0,
|
|
116
|
+
|
|
117
|
+
'react/jsx-filename-extension': [
|
|
118
|
+
2,
|
|
119
|
+
{
|
|
120
|
+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
|
|
124
|
+
'react/jsx-fragments': 0,
|
|
125
|
+
'react/jsx-props-no-spreading': 0,
|
|
126
|
+
'react/jsx-uses-react': 'off',
|
|
127
|
+
'react/react-in-jsx-scope': 'off',
|
|
128
|
+
semi: ['error', 'never'],
|
|
129
|
+
|
|
130
|
+
'import/extensions': [
|
|
131
|
+
'error',
|
|
132
|
+
'ignorePackages',
|
|
133
|
+
{
|
|
134
|
+
js: 'never',
|
|
135
|
+
jsx: 'never',
|
|
136
|
+
ts: 'never',
|
|
137
|
+
tsx: 'never',
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
|
|
141
|
+
'@typescript-eslint/no-empty-function': 0,
|
|
142
|
+
'@typescript-eslint/strict-boolean-expressions': 0,
|
|
143
|
+
'@typescript-eslint/prefer-nullish-coalescing': 0,
|
|
144
|
+
'object-curly-spacing': 0,
|
|
145
|
+
'comma-dangle': 0,
|
|
146
|
+
'no-unused-vars': 0,
|
|
123
147
|
},
|
|
124
148
|
},
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
'import/named': 2,
|
|
128
|
-
|
|
129
|
-
'import/no-extraneous-dependencies': [
|
|
130
|
-
0,
|
|
131
|
-
{
|
|
132
|
-
devDependencies: ['**/*.test.js', '**/*.story.js', '**/*.test.ts', '**/*.story.tsx'],
|
|
133
|
-
},
|
|
134
|
-
],
|
|
135
|
-
|
|
136
|
-
'import/prefer-default-export': 'off',
|
|
137
|
-
'import/no-relative-packages': 'off',
|
|
138
|
-
'jsx-a11y/accessible-emoji': 0,
|
|
139
|
-
'prettier/prettier': 'error',
|
|
140
|
-
'react-hooks/exhaustive-deps': 'warn',
|
|
141
|
-
'react-hooks/rules-of-hooks': 'error',
|
|
142
|
-
'react/jsx-boolean-value': 0,
|
|
143
|
-
|
|
144
|
-
'react/jsx-filename-extension': [
|
|
145
|
-
2,
|
|
146
|
-
{
|
|
147
|
-
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
148
|
-
},
|
|
149
|
-
],
|
|
150
|
-
|
|
151
|
-
'react/jsx-fragments': 0,
|
|
152
|
-
'react/jsx-props-no-spreading': 0,
|
|
153
|
-
'react/jsx-uses-react': 'off',
|
|
154
|
-
'react/react-in-jsx-scope': 'off',
|
|
155
|
-
semi: ['error', 'never'],
|
|
156
|
-
|
|
157
|
-
'import/extensions': [
|
|
158
|
-
'error',
|
|
159
|
-
'ignorePackages',
|
|
160
|
-
{
|
|
161
|
-
js: 'never',
|
|
162
|
-
jsx: 'never',
|
|
163
|
-
ts: 'never',
|
|
164
|
-
tsx: 'never',
|
|
165
|
-
},
|
|
166
|
-
],
|
|
167
|
-
|
|
168
|
-
'@typescript-eslint/no-empty-function': 0,
|
|
169
|
-
'@typescript-eslint/strict-boolean-expressions': 0,
|
|
170
|
-
'@typescript-eslint/prefer-nullish-coalescing': 0,
|
|
171
|
-
'object-curly-spacing': 0,
|
|
172
|
-
'comma-dangle': 0,
|
|
173
|
-
'no-unused-vars': 0,
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
])
|
|
149
|
+
])
|
|
150
|
+
}
|
package/jest/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/jest/config.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/jest/config.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;EAsBC"}
|
package/jest/config.js
CHANGED
|
@@ -23,7 +23,9 @@ function getJestSetup(_ref) {
|
|
|
23
23
|
collectCoverage: collectCoverage,
|
|
24
24
|
coverageReporters: ['lcov', 'text'],
|
|
25
25
|
collectCoverageFrom: collectCoverageFrom,
|
|
26
|
-
|
|
26
|
+
// https://jest-extended.jestcommunity.dev/docs/getting-started/setup
|
|
27
|
+
// https://jest-extended.jestcommunity.dev/docs/matchers
|
|
28
|
+
setupFilesAfterEnv: ['<rootDir>/jest.setup.js', 'jest-extended/all'],
|
|
27
29
|
moduleNameMapper: {
|
|
28
30
|
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|md)$': '<rootDir>/.mock/file.js',
|
|
29
31
|
'^.+\\.(css|less|scss|md)$': 'identity-obj-proxy'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papillonarts/setup",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Papillon Arts Setup",
|
|
5
5
|
"homepage": "https://github.com/papillonarts/papillonarts/tree/master/packages/setup",
|
|
6
6
|
"repository": {
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"install-packages": "npm i",
|
|
26
26
|
"install-papillonarts-latest": "echo \"setup skipping install-papillonarts-latest\" && exit 0",
|
|
27
27
|
"generate-typing": "tsc",
|
|
28
|
-
"generate-commonjs": "rm -rf build && babel --copy-files --no-copy-ignored --extensions '.js,.jsx,.ts,.tsx' --out-dir build src --ignore **/__tests__",
|
|
28
|
+
"generate-commonjs": "rm -rf build && babel --copy-files --no-copy-ignored --extensions '.js,.jsx,.ts,.tsx,.md' --out-dir build src --ignore **/__tests__,**/*.md",
|
|
29
29
|
"build": "npm-run-all generate-commonjs generate-typing",
|
|
30
30
|
"build-test": "npm run build",
|
|
31
31
|
"build-acceptance": "npm run build",
|
|
32
32
|
"build-release": "npm run build"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "544268349dfa3909e32fd124346312cc53a64294"
|
|
35
35
|
}
|