@papillonarts/setup 0.28.0 → 0.30.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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/eslint/index.mjs"],"names":[],"mappings":"AAsBA;;qCAqIC"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/eslint/index.mjs"],"names":[],"mappings":"AAwBA;;qCAmJC"}
@@ -1,16 +1,18 @@
1
- import { defineConfig, globalIgnores } from 'eslint/config'
2
1
  import { fixupConfigRules, fixupPluginRules } from '@eslint/compat'
3
- import react from 'eslint-plugin-react'
4
- import reactHooks from 'eslint-plugin-react-hooks'
5
- import jsxA11Y from 'eslint-plugin-jsx-a11y'
2
+ import { FlatCompat } from '@eslint/eslintrc'
3
+ import js from '@eslint/js'
4
+ import tsParser from '@typescript-eslint/parser'
5
+ import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript'
6
+ import { importX } from 'eslint-plugin-import-x'
6
7
  import jest from 'eslint-plugin-jest'
8
+ import jsxA11Y from 'eslint-plugin-jsx-a11y'
7
9
  import prettier from 'eslint-plugin-prettier'
10
+ import react from 'eslint-plugin-react'
11
+ import reactHooks from 'eslint-plugin-react-hooks'
12
+ import { defineConfig, globalIgnores } from 'eslint/config'
8
13
  import globals from 'globals'
9
- import tsParser from '@typescript-eslint/parser'
10
14
  import path from 'node:path'
11
15
  import { fileURLToPath } from 'node:url'
12
- import js from '@eslint/js'
13
- import { FlatCompat } from '@eslint/eslintrc'
14
16
 
15
17
  const __filename = fileURLToPath(import.meta.url)
16
18
  const __dirname = path.dirname(__filename)
@@ -24,20 +26,24 @@ export function getESLintSetup({ eslintIgnores }) {
24
26
  return defineConfig([
25
27
  globalIgnores(eslintIgnores),
26
28
  {
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',
29
+ extends: [
30
+ ...fixupConfigRules(
31
+ compat.extends(
32
+ 'eslint:recommended',
33
+ 'plugin:import/errors',
34
+ 'plugin:import/warnings',
35
+ 'plugin:react/recommended',
36
+ 'plugin:jsx-a11y/recommended',
37
+ 'plugin:jest/recommended',
38
+ 'prettier',
39
+ 'plugin:@typescript-eslint/stylistic-type-checked',
40
+ ),
37
41
  ),
38
- ),
42
+ 'import-x/flat/recommended',
43
+ 'import-x/flat/typescript',
44
+ ],
39
45
 
40
- files: ['**/*.ts', '**/*.tsx'],
46
+ files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
41
47
 
42
48
  plugins: {
43
49
  react: fixupPluginRules(react),
@@ -45,6 +51,9 @@ export function getESLintSetup({ eslintIgnores }) {
45
51
  'jsx-a11y': fixupPluginRules(jsxA11Y),
46
52
  jest: fixupPluginRules(jest),
47
53
  prettier,
54
+ // https://www.npmjs.com/package/eslint-plugin-import-x
55
+ // https://github.com/un-ts/eslint-plugin-import-x
56
+ 'import-x': importX,
48
57
  },
49
58
 
50
59
  languageOptions: {
@@ -65,8 +74,8 @@ export function getESLintSetup({ eslintIgnores }) {
65
74
  },
66
75
 
67
76
  parser: tsParser,
68
- ecmaVersion: 16,
69
- sourceType: 'commonjs',
77
+ ecmaVersion: 'latest',
78
+ sourceType: 'module',
70
79
 
71
80
  parserOptions: {
72
81
  ecmaFeatures: {
@@ -82,12 +91,6 @@ export function getESLintSetup({ eslintIgnores }) {
82
91
  settings: {
83
92
  'import/resolver': {
84
93
  alias: {
85
- map: [
86
- ['@papillonarts/components', '@papillonarts/components/build'],
87
- ['@papillonarts/css', '@papillonarts/css/build'],
88
- ['@papillonarts/library', '@papillonarts/library/build'],
89
- ['@papillonarts/setup', '@papillonarts/setup/build'],
90
- ],
91
94
  extensions: ['.js', '.jsx', '.ts', '.tsx'],
92
95
  },
93
96
 
@@ -96,8 +99,21 @@ export function getESLintSetup({ eslintIgnores }) {
96
99
  },
97
100
  },
98
101
 
102
+ // https://www.npmjs.com/package/eslint-import-resolver-typescript
103
+ // https://github.com/import-js/eslint-import-resolver-typescript
104
+ 'import-x/resolver-next': [
105
+ createTypeScriptImportResolver({
106
+ project: [
107
+ '<root>/tsconfig.json',
108
+ '<root>packages/components/tsconfig.json',
109
+ '<root>packages/library/jsconfig.json',
110
+ '<root>packages/setup/jsconfig.json',
111
+ ],
112
+ }),
113
+ ],
114
+
99
115
  react: {
100
- version: '19.2.0',
116
+ version: '19.2.1',
101
117
  },
102
118
  },
103
119
 
@@ -9,6 +9,9 @@ export declare function getJestSetup({ testPathIgnorePatterns, coverageDirectory
9
9
  globals?: {
10
10
  [x: string]: unknown;
11
11
  };
12
+ cache?: boolean;
13
+ resolver?: string;
14
+ roots?: string[];
12
15
  testPathIgnorePatterns?: string[];
13
16
  coverageDirectory?: string;
14
17
  collectCoverage?: boolean;
@@ -29,7 +32,6 @@ export declare function getJestSetup({ testPathIgnorePatterns, coverageDirectory
29
32
  };
30
33
  automock?: boolean;
31
34
  bail?: number | boolean;
32
- cache?: boolean;
33
35
  cacheDirectory?: string;
34
36
  ci?: boolean;
35
37
  clearMocks?: boolean;
@@ -111,10 +113,8 @@ export declare function getJestSetup({ testPathIgnorePatterns, coverageDirectory
111
113
  replname?: string;
112
114
  resetMocks?: boolean;
113
115
  resetModules?: boolean;
114
- resolver?: string;
115
116
  restoreMocks?: boolean;
116
117
  rootDir?: string;
117
- roots?: string[];
118
118
  runner?: string;
119
119
  runTestsByPath?: boolean;
120
120
  runtime?: string;
@@ -1,6 +1,10 @@
1
- export let tabWidth: number;
2
- export let semi: boolean;
3
- export let singleQuote: boolean;
4
1
  export let printWidth: number;
2
+ export let tabWidth: number;
5
3
  export let trailingComma: string;
4
+ export let singleQuote: boolean;
5
+ export let semi: boolean;
6
+ export let plugins: string[];
7
+ export let importOrder: string[];
8
+ export let importOrderSeparation: boolean;
9
+ export let importOrderSortSpecifiers: boolean;
6
10
  //# sourceMappingURL=index.d.ts.map
@@ -1,9 +1,17 @@
1
1
  "use strict";
2
2
 
3
3
  module.exports = {
4
+ printWidth: 140,
4
5
  tabWidth: 2,
5
- semi: false,
6
+ trailingComma: 'all',
6
7
  singleQuote: true,
7
- printWidth: 140,
8
- trailingComma: 'all'
8
+ semi: false,
9
+ // https://www.npmjs.com/package/@trivago/prettier-plugin-sort-imports
10
+ // https://github.com/trivago/prettier-plugin-sort-imports
11
+ // https://eslint.org/docs/latest/rules/sort-imports
12
+ // https://perfectionist.dev/rules/sort-imports
13
+ plugins: ['@trivago/prettier-plugin-sort-imports'],
14
+ importOrder: ['^@core/(.*)$', '^@server/(.*)$', '^@ui/(.*)$', '^[./]'],
15
+ importOrderSeparation: false,
16
+ importOrderSortSpecifiers: true
9
17
  };
@@ -1 +1 @@
1
- {"version":3,"file":"mainSetup.d.ts","sourceRoot":"","sources":["../../src/storybook/mainSetup.ts"],"names":[],"mappings":"AAYA,wBAAgB,qBAAqB,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE;;;;CAAA,uDA+P1E"}
1
+ {"version":3,"file":"mainSetup.d.ts","sourceRoot":"","sources":["../../src/storybook/mainSetup.ts"],"names":[],"mappings":"AAUA,wBAAgB,qBAAqB,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE;;;;CAAA,uDA+P1E"}
@@ -15,7 +15,6 @@ var _webpack2 = require("@papillonarts/setup/webpack");
15
15
  var _forkTsCheckerWebpackPlugin = _interopRequireDefault(require("fork-ts-checker-webpack-plugin"));
16
16
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
17
17
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // https://storybook.js.org/docs/configure#configure-story-loading
18
- // import { isEmptyObject } from '../../../library/src/object'
19
18
  // https://storybook.js.org/docs/api
20
19
  // https://storybook.js.org/docs/api/main-config/main-config
21
20
  // https://storybook.js.org/docs/api/csf/csf-next#definemain
@@ -1 +1 @@
1
- {"version":3,"file":"previewSetup.d.ts","sourceRoot":"","sources":["../../src/storybook/previewSetup.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAsB,MAAM,2BAA2B,CAAA;AAI5E,wBAAgB,wBAAwB,IAAI,OAAO,CA6DlD"}
1
+ {"version":3,"file":"previewSetup.d.ts","sourceRoot":"","sources":["../../src/storybook/previewSetup.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAsB,MAAM,2BAA2B,CAAA;AAI5E,wBAAgB,wBAAwB,IAAI,OAAO,CA6DlD"}
@@ -6,8 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getStorybookPreviewSetup = getStorybookPreviewSetup;
7
7
  var _reactRouterDom = require("react-router-dom");
8
8
  var _jsxRuntime = require("react/jsx-runtime");
9
- // import { DocsContainer, DocsPage } from '@storybook/addon-docs/blocks'
10
-
11
9
  // https://storybook.js.org/docs/configure#configure-story-rendering
12
10
  // https://storybook.js.org/docs/api/csf/csf-next#definepreview
13
11
  function getStorybookPreviewSetup() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@papillonarts/setup",
3
- "version": "0.28.0",
3
+ "version": "0.30.0",
4
4
  "description": "Papillon Arts Setup",
5
5
  "homepage": "https://github.com/papillonarts/papillonarts/tree/master/packages/setup",
6
6
  "repository": {
@@ -37,5 +37,5 @@
37
37
  "build-acceptance": "npm run build",
38
38
  "build-release": "npm run build"
39
39
  },
40
- "gitHead": "32ab1744d28ba85eb6c7a9b13801ca14f6b73b05"
40
+ "gitHead": "b5212359dc72922d6a8fd3c5100acce81e11b874"
41
41
  }