create-spfx-tailwind-app 1.0.10

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.
Files changed (34) hide show
  1. package/Readme.md +205 -0
  2. package/Template/.eslintrc.js +321 -0
  3. package/Template/.vscode/launch.json +23 -0
  4. package/Template/.vscode/settings.json +14 -0
  5. package/Template/.yo-rc.json +19 -0
  6. package/Template/README.md +190 -0
  7. package/Template/config/config.json +18 -0
  8. package/Template/config/deploy-azure-storage.json +7 -0
  9. package/Template/config/package-solution.json +40 -0
  10. package/Template/config/rig.json +7 -0
  11. package/Template/config/sass.json +5 -0
  12. package/Template/config/serve.json +6 -0
  13. package/Template/config/typescript.json +9 -0
  14. package/Template/config/write-manifests.json +4 -0
  15. package/Template/package-lock.json +21549 -0
  16. package/Template/package.json +60 -0
  17. package/Template/postcss.config.js +6 -0
  18. package/Template/setup.js +75 -0
  19. package/Template/src/tailwind.generated.css +559 -0
  20. package/Template/src/webparts/__PROJECT_NAME_LOWER__/__PROJECT_NAME__WebPart.manifest.json +28 -0
  21. package/Template/src/webparts/__PROJECT_NAME_LOWER__/__PROJECT_NAME__WebPart.ts +181 -0
  22. package/Template/src/webparts/__PROJECT_NAME_LOWER__/assets/welcome-dark.png +0 -0
  23. package/Template/src/webparts/__PROJECT_NAME_LOWER__/assets/welcome-light.png +0 -0
  24. package/Template/src/webparts/__PROJECT_NAME_LOWER__/components/I__PROJECT_NAME__Props.ts +12 -0
  25. package/Template/src/webparts/__PROJECT_NAME_LOWER__/components/__PROJECT_NAME__.tsx +9 -0
  26. package/Template/src/webparts/__PROJECT_NAME_LOWER__/loc/en-us.js +16 -0
  27. package/Template/src/webparts/__PROJECT_NAME_LOWER__/loc/mystrings.d.ts +19 -0
  28. package/Template/src/webparts/__PROJECT_NAME_LOWER__/tailwind.css +3 -0
  29. package/Template/tailwind.config.js +8 -0
  30. package/Template/teams/aa77f8d0-89f1-4335-816c-cb8bffa03b3c_color.png +0 -0
  31. package/Template/teams/aa77f8d0-89f1-4335-816c-cb8bffa03b3c_outline.png +0 -0
  32. package/Template/tsconfig.json +3 -0
  33. package/index.js +137 -0
  34. package/package.json +42 -0
package/Readme.md ADDED
@@ -0,0 +1,205 @@
1
+ ## 🚀 Usage
2
+
3
+ ### Create a new SPFx project
4
+
5
+
6
+ npx create-spfx-tailwind-app-v1 MyProject
7
+
8
+ ![npm version](https://img.shields.io/npm/v/create-spfx-tailwind-app-v1)
9
+ ![npm downloads](https://img.shields.io/npm/dt/create-spfx-tailwind-app-v1)
10
+ ![license](https://img.shields.io/npm/l/create-spfx-tailwind-app-v1)
11
+ ![SPFx](https://img.shields.io/badge/SPFx-1.22+-green)
12
+
13
+ A modern CLI tool to scaffold **SharePoint Framework (SPFx)** projects
14
+ with **Tailwind CSS pre-configured** --- no manual setup required.
15
+
16
+ ------------------------------------------------------------------------
17
+
18
+ ## ✨ Features
19
+
20
+ - ⚡ One-command SPFx project creation\
21
+ - 🎨 Tailwind CSS ready out of the box\
22
+ - 🧠 Smart CLI (interactive prompts + flags)\
23
+ - 📦 Optional dependency installation\
24
+ - 🏗 Built for SPFx v1.22+ (Heft-based projects)\
25
+ - 🔁 No manual renaming required
26
+
27
+ ------------------------------------------------------------------------
28
+
29
+ ## 📦 Usage
30
+
31
+ ### ▶️ Create a project
32
+
33
+ ``` bash
34
+ npx create-spfx-tailwind-app MyProject
35
+ ```
36
+
37
+ ------------------------------------------------------------------------
38
+
39
+ ### ▶️ Or install globally
40
+
41
+ ``` bash
42
+ npm install -g create-spfx-tailwind-app
43
+ create-spfx-app MyProject
44
+ ```
45
+
46
+ ------------------------------------------------------------------------
47
+
48
+ ## ⚙️ CLI Options
49
+
50
+ ``` bash
51
+ create-spfx-app <project-name> [options]
52
+ ```
53
+
54
+ ### Options
55
+
56
+ - `--no-install` → Skip dependency installation
57
+
58
+ ### Example
59
+
60
+ ``` bash
61
+ create-spfx-app MyProject --no-install
62
+ ```
63
+
64
+ ------------------------------------------------------------------------
65
+
66
+ ## 🛠 After Project Creation
67
+
68
+ ### If you skipped install:
69
+
70
+ ``` bash
71
+ cd MyProject
72
+ npm install
73
+ ```
74
+
75
+ ------------------------------------------------------------------------
76
+
77
+ ## ▶️ Start Development
78
+
79
+ Run in **two terminals**:
80
+
81
+ ``` bash
82
+ # Terminal 1
83
+ npm run start
84
+ ```
85
+
86
+ ``` bash
87
+ # Terminal 2 (Tailwind watcher)
88
+ npm run build:tailwind
89
+ ```
90
+
91
+ ------------------------------------------------------------------------
92
+
93
+ ## 🧱 Tech Stack
94
+
95
+ - SharePoint Framework (SPFx) v1.22+
96
+ - React
97
+ - Tailwind CSS
98
+ - Heft build system
99
+ - Node.js
100
+
101
+ ------------------------------------------------------------------------
102
+
103
+ ## 📁 Project Structure
104
+
105
+ MyProject/
106
+ ├── .vscode/
107
+ ├── config/
108
+ ├── src/
109
+ ├── teams/
110
+ ├── temp/
111
+ ├── .eslintrc.js
112
+ ├── .gitignore
113
+ ├── .yo-rc.json
114
+ ├── package.json
115
+ ├── package-lock.json
116
+ ├── postcss.config.js
117
+ ├── README.md
118
+ ├── setup.js
119
+ ├── tailwind.config.js
120
+ ├── tsconfig.json
121
+
122
+ ------------------------------------------------------------------------
123
+
124
+ ## 🎯 Why this tool?
125
+
126
+ The default SPFx generator:
127
+
128
+ ``` bash
129
+ yo @microsoft/sharepoint
130
+ ```
131
+
132
+ ❌ Requires manual setup\
133
+ ❌ No Tailwind support\
134
+ ❌ Repetitive configuration
135
+
136
+ ------------------------------------------------------------------------
137
+
138
+ This CLI solves that by:
139
+
140
+ ✔ Automating setup\
141
+ ✔ Adding Tailwind out of the box\
142
+ ✔ Improving developer experience
143
+
144
+ ------------------------------------------------------------------------
145
+
146
+ ## 📌 Prerequisites
147
+
148
+ - Node.js (v22 recommended)
149
+ - npm
150
+ - SPFx development environment
151
+
152
+ ------------------------------------------------------------------------
153
+
154
+ ## 🧪 Example
155
+
156
+ ``` bash
157
+ npx create-spfx-tailwind-app MyProject
158
+ ```
159
+
160
+ ------------------------------------------------------------------------
161
+
162
+ ## 🧑‍💻 Author
163
+
164
+ Deependra Singh
165
+
166
+ ------------------------------------------------------------------------
167
+
168
+ ## 📄 License
169
+
170
+ MIT License
171
+
172
+ ------------------------------------------------------------------------
173
+
174
+ ## ⚠️ Disclaimer
175
+
176
+ This project is not officially affiliated with Microsoft.\
177
+ Use at your own risk.
178
+
179
+ ------------------------------------------------------------------------
180
+
181
+ ## ⭐ Contributing
182
+
183
+ Contributions are welcome!\
184
+ Feel free to open issues or submit pull requests.
185
+
186
+ ------------------------------------------------------------------------
187
+
188
+ ## 🔗 References
189
+
190
+ - https://learn.microsoft.com/sharepoint/dev/spfx/
191
+ - https://tailwindcss.com/
192
+ - https://heft.rushstack.io/
193
+
194
+ ------------------------------------------------------------------------
195
+
196
+ ## 💬 Support
197
+
198
+ If you find this useful:
199
+
200
+ ⭐ Star the repo\
201
+ 🔁 Share with your team
202
+
203
+ ------------------------------------------------------------------------
204
+
205
+ Happy coding 🚀
@@ -0,0 +1,321 @@
1
+ require('@rushstack/eslint-config/patch/modern-module-resolution');
2
+ module.exports = {
3
+ extends: ['@microsoft/eslint-config-spfx/lib/profiles/react'],
4
+ parserOptions: { tsconfigRootDir: __dirname },
5
+ overrides: [
6
+ {
7
+ files: ['*.ts', '*.tsx'],
8
+ parser: '@typescript-eslint/parser',
9
+ 'parserOptions': {
10
+ 'project': './tsconfig.json',
11
+ 'ecmaVersion': 2018,
12
+ 'sourceType': 'module'
13
+ },
14
+ rules: {
15
+ // Prevent usage of the JavaScript null value, while allowing code to access existing APIs that may require null. https://www.npmjs.com/package/@rushstack/eslint-plugin
16
+ '@rushstack/no-new-null': 1,
17
+ // Require Jest module mocking APIs to be called before any other statements in their code block. https://www.npmjs.com/package/@rushstack/eslint-plugin
18
+ '@rushstack/hoist-jest-mock': 1,
19
+ // Require chunk names for dynamic imports in SPFx projects. https://www.npmjs.com/package/@rushstack/eslint-plugin
20
+ '@rushstack/import-requires-chunk-name': 1,
21
+ // Ensure that React components rendered with ReactDOM.render() are unmounted with ReactDOM.unmountComponentAtNode(). https://www.npmjs.com/package/@rushstack/eslint-plugin
22
+ '@rushstack/pair-react-dom-render-unmount': 1,
23
+ // Require regular expressions to be constructed from string constants rather than dynamically building strings at runtime. https://www.npmjs.com/package/@rushstack/eslint-plugin-security
24
+ '@rushstack/security/no-unsafe-regexp': 1,
25
+ // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
26
+ '@typescript-eslint/adjacent-overload-signatures': 1,
27
+ // RATIONALE: Code is more readable when the type of every variable is immediately obvious.
28
+ // Even if the compiler may be able to infer a type, this inference will be unavailable
29
+ // to a person who is reviewing a GitHub diff. This rule makes writing code harder,
30
+ // but writing code is a much less important activity than reading it.
31
+ //
32
+ // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
33
+ '@typescript-eslint/explicit-function-return-type': [
34
+ 1,
35
+ {
36
+ 'allowExpressions': true,
37
+ 'allowTypedFunctionExpressions': true,
38
+ 'allowHigherOrderFunctions': false
39
+ }
40
+ ],
41
+ // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
42
+ // Rationale to disable: although this is a recommended rule, it is up to dev to select coding style.
43
+ // Set to 1 (warning) or 2 (error) to enable.
44
+ '@typescript-eslint/explicit-member-accessibility': 0,
45
+ // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
46
+ '@typescript-eslint/no-array-constructor': 1,
47
+ // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
48
+ //
49
+ // RATIONALE: The "any" keyword disables static type checking, the main benefit of using TypeScript.
50
+ // This rule should be suppressed only in very special cases such as JSON.stringify()
51
+ // where the type really can be anything. Even if the type is flexible, another type
52
+ // may be more appropriate such as "unknown", "{}", or "Record<k,V>".
53
+ '@typescript-eslint/no-explicit-any': 1,
54
+ // RATIONALE: The #1 rule of promises is that every promise chain must be terminated by a catch()
55
+ // handler. Thus wherever a Promise arises, the code must either append a catch handler,
56
+ // or else return the object to a caller (who assumes this responsibility). Unterminated
57
+ // promise chains are a serious issue. Besides causing errors to be silently ignored,
58
+ // they can also cause a NodeJS process to terminate unexpectedly.
59
+ '@typescript-eslint/no-floating-promises': 2,
60
+ // RATIONALE: Catches a common coding mistake.
61
+ '@typescript-eslint/no-for-in-array': 2,
62
+ // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
63
+ '@typescript-eslint/no-misused-new': 2,
64
+ // RATIONALE: The "namespace" keyword is not recommended for organizing code because JavaScript lacks
65
+ // a "using" statement to traverse namespaces. Nested namespaces prevent certain bundler
66
+ // optimizations. If you are declaring loose functions/variables, it's better to make them
67
+ // static members of a class, since classes support property getters and their private
68
+ // members are accessible by unit tests. Also, the exercise of choosing a meaningful
69
+ // class name tends to produce more discoverable APIs: for example, search+replacing
70
+ // the function "reverse()" is likely to return many false matches, whereas if we always
71
+ // write "Text.reverse()" is more unique. For large scale organization, it's recommended
72
+ // to decompose your code into separate NPM packages, which ensures that component
73
+ // dependencies are tracked more conscientiously.
74
+ //
75
+ // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
76
+ '@typescript-eslint/no-namespace': [
77
+ 1,
78
+ {
79
+ 'allowDeclarations': false,
80
+ 'allowDefinitionFiles': false
81
+ }
82
+ ],
83
+ // RATIONALE: Parameter properties provide a shorthand such as "constructor(public title: string)"
84
+ // that avoids the effort of declaring "title" as a field. This TypeScript feature makes
85
+ // code easier to write, but arguably sacrifices readability: In the notes for
86
+ // "@typescript-eslint/member-ordering" we pointed out that fields are central to
87
+ // a class's design, so we wouldn't want to bury them in a constructor signature
88
+ // just to save some typing.
89
+ //
90
+ // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
91
+ // Set to 1 (warning) or 2 (error) to enable the rule
92
+ '@typescript-eslint/parameter-properties': 0,
93
+ // RATIONALE: When left in shipping code, unused variables often indicate a mistake. Dead code
94
+ // may impact performance.
95
+ //
96
+ // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
97
+ '@typescript-eslint/no-unused-vars': [
98
+ 1,
99
+ {
100
+ 'vars': 'all',
101
+ // Unused function arguments often indicate a mistake in JavaScript code. However in TypeScript code,
102
+ // the compiler catches most of those mistakes, and unused arguments are fairly common for type signatures
103
+ // that are overriding a base class method or implementing an interface.
104
+ 'args': 'none'
105
+ }
106
+ ],
107
+ // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
108
+ '@typescript-eslint/no-use-before-define': [
109
+ 2,
110
+ {
111
+ 'functions': false,
112
+ 'classes': true,
113
+ 'variables': true,
114
+ 'enums': true,
115
+ 'typedefs': true
116
+ }
117
+ ],
118
+ // Disallows require statements except in import statements.
119
+ // In other words, the use of forms such as var foo = require("foo") are banned. Instead use ES6 style imports or import foo = require("foo") imports.
120
+ '@typescript-eslint/no-var-requires': 'error',
121
+ // RATIONALE: The "module" keyword is deprecated except when describing legacy libraries.
122
+ //
123
+ // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
124
+ '@typescript-eslint/prefer-namespace-keyword': 1,
125
+ // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
126
+ // Rationale to disable: it's up to developer to decide if he wants to add type annotations
127
+ // Set to 1 (warning) or 2 (error) to enable the rule
128
+ '@typescript-eslint/no-inferrable-types': 0,
129
+ // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
130
+ // Rationale to disable: declaration of empty interfaces may be helpful for generic types scenarios
131
+ '@typescript-eslint/no-empty-interface': 0,
132
+ // RATIONALE: This rule warns if setters are defined without getters, which is probably a mistake.
133
+ 'accessor-pairs': 1,
134
+ // RATIONALE: In TypeScript, if you write x["y"] instead of x.y, it disables type checking.
135
+ 'dot-notation': [
136
+ 1,
137
+ {
138
+ 'allowPattern': '^_'
139
+ }
140
+ ],
141
+ // RATIONALE: Catches code that is likely to be incorrect
142
+ 'eqeqeq': 1,
143
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
144
+ 'for-direction': 1,
145
+ // RATIONALE: Catches a common coding mistake.
146
+ 'guard-for-in': 2,
147
+ // RATIONALE: If you have more than 2,000 lines in a single source file, it's probably time
148
+ // to split up your code.
149
+ 'max-lines': ['warn', { max: 2000 }],
150
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
151
+ 'no-async-promise-executor': 2,
152
+ // RATIONALE: Deprecated language feature.
153
+ 'no-caller': 2,
154
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
155
+ 'no-compare-neg-zero': 2,
156
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
157
+ 'no-cond-assign': 2,
158
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
159
+ 'no-constant-condition': 1,
160
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
161
+ 'no-control-regex': 2,
162
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
163
+ 'no-debugger': 1,
164
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
165
+ 'no-delete-var': 2,
166
+ // RATIONALE: Catches code that is likely to be incorrect
167
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
168
+ 'no-duplicate-case': 2,
169
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
170
+ 'no-empty': 1,
171
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
172
+ 'no-empty-character-class': 2,
173
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
174
+ 'no-empty-pattern': 1,
175
+ // RATIONALE: Eval is a security concern and a performance concern.
176
+ 'no-eval': 1,
177
+ // RATIONALE: Catches code that is likely to be incorrect
178
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
179
+ 'no-ex-assign': 2,
180
+ // RATIONALE: System types are global and should not be tampered with in a scalable code base.
181
+ // If two different libraries (or two versions of the same library) both try to modify
182
+ // a type, only one of them can win. Polyfills are acceptable because they implement
183
+ // a standardized interoperable contract, but polyfills are generally coded in plain
184
+ // JavaScript.
185
+ 'no-extend-native': 1,
186
+ // Disallow unnecessary labels
187
+ 'no-extra-label': 1,
188
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
189
+ 'no-fallthrough': 2,
190
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
191
+ 'no-func-assign': 1,
192
+ // RATIONALE: Catches a common coding mistake.
193
+ 'no-implied-eval': 2,
194
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
195
+ 'no-invalid-regexp': 2,
196
+ // RATIONALE: Catches a common coding mistake.
197
+ 'no-label-var': 2,
198
+ // RATIONALE: Eliminates redundant code.
199
+ 'no-lone-blocks': 1,
200
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
201
+ 'no-misleading-character-class': 2,
202
+ // RATIONALE: Catches a common coding mistake.
203
+ 'no-multi-str': 2,
204
+ // RATIONALE: It's generally a bad practice to call "new Thing()" without assigning the result to
205
+ // a variable. Either it's part of an awkward expression like "(new Thing()).doSomething()",
206
+ // or else implies that the constructor is doing nontrivial computations, which is often
207
+ // a poor class design.
208
+ 'no-new': 1,
209
+ // RATIONALE: Obsolete language feature that is deprecated.
210
+ 'no-new-func': 2,
211
+ // RATIONALE: Obsolete language feature that is deprecated.
212
+ 'no-new-object': 2,
213
+ // RATIONALE: Obsolete notation.
214
+ 'no-new-wrappers': 1,
215
+ // RATIONALE: Catches code that is likely to be incorrect
216
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
217
+ 'no-octal': 2,
218
+ // RATIONALE: Catches code that is likely to be incorrect
219
+ 'no-octal-escape': 2,
220
+ // RATIONALE: Catches code that is likely to be incorrect
221
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
222
+ 'no-regex-spaces': 2,
223
+ // RATIONALE: Catches a common coding mistake.
224
+ 'no-return-assign': 2,
225
+ // RATIONALE: Security risk.
226
+ 'no-script-url': 1,
227
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
228
+ 'no-self-assign': 2,
229
+ // RATIONALE: Catches a common coding mistake.
230
+ 'no-self-compare': 2,
231
+ // RATIONALE: This avoids statements such as "while (a = next(), a && a.length);" that use
232
+ // commas to create compound expressions. In general code is more readable if each
233
+ // step is split onto a separate line. This also makes it easier to set breakpoints
234
+ // in the debugger.
235
+ 'no-sequences': 1,
236
+ // RATIONALE: Catches code that is likely to be incorrect
237
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
238
+ 'no-shadow-restricted-names': 2,
239
+ // RATIONALE: Obsolete language feature that is deprecated.
240
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
241
+ 'no-sparse-arrays': 2,
242
+ // RATIONALE: Although in theory JavaScript allows any possible data type to be thrown as an exception,
243
+ // such flexibility adds pointless complexity, by requiring every catch block to test
244
+ // the type of the object that it receives. Whereas if catch blocks can always assume
245
+ // that their object implements the "Error" contract, then the code is simpler, and
246
+ // we generally get useful additional information like a call stack.
247
+ 'no-throw-literal': 2,
248
+ // RATIONALE: Catches a common coding mistake.
249
+ 'no-unmodified-loop-condition': 1,
250
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
251
+ 'no-unsafe-finally': 2,
252
+ // RATIONALE: Catches a common coding mistake.
253
+ 'no-unused-expressions': 1,
254
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
255
+ 'no-unused-labels': 1,
256
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
257
+ 'no-useless-catch': 1,
258
+ // RATIONALE: Avoids a potential performance problem.
259
+ 'no-useless-concat': 1,
260
+ // RATIONALE: The "var" keyword is deprecated because of its confusing "hoisting" behavior.
261
+ // Always use "let" or "const" instead.
262
+ //
263
+ // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
264
+ 'no-var': 2,
265
+ // RATIONALE: Generally not needed in modern code.
266
+ 'no-void': 1,
267
+ // RATIONALE: Obsolete language feature that is deprecated.
268
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
269
+ 'no-with': 2,
270
+ // RATIONALE: Makes logic easier to understand, since constants always have a known value
271
+ // @typescript-eslint\eslint-plugin\dist\configs\eslint-recommended.js
272
+ 'prefer-const': 1,
273
+ // RATIONALE: Catches a common coding mistake where "resolve" and "reject" are confused.
274
+ 'promise/param-names': 2,
275
+ // RATIONALE: Catches code that is likely to be incorrect
276
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
277
+ 'require-atomic-updates': 2,
278
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
279
+ 'require-yield': 1,
280
+ // "Use strict" is redundant when using the TypeScript compiler.
281
+ 'strict': [
282
+ 2,
283
+ 'never'
284
+ ],
285
+ // RATIONALE: Catches code that is likely to be incorrect
286
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
287
+ 'use-isnan': 2,
288
+ // STANDARDIZED BY: eslint\conf\eslint-recommended.js
289
+ // Set to 1 (warning) or 2 (error) to enable.
290
+ // Rationale to disable: !!{}
291
+ 'no-extra-boolean-cast': 0,
292
+ // ====================================================================
293
+ // @microsoft/eslint-plugin-spfx
294
+ // ====================================================================
295
+ '@microsoft/spfx/no-require-ensure': 2,
296
+ }
297
+ },
298
+ {
299
+ // For unit tests, we can be a little bit less strict. The settings below revise the
300
+ // defaults specified in the extended configurations, as well as above.
301
+ files: [
302
+ // Test files
303
+ '*.test.ts',
304
+ '*.test.tsx',
305
+ '*.spec.ts',
306
+ '*.spec.tsx',
307
+
308
+ // Facebook convention
309
+ '**/__mocks__/*.ts',
310
+ '**/__mocks__/*.tsx',
311
+ '**/__tests__/*.ts',
312
+ '**/__tests__/*.tsx',
313
+
314
+ // Microsoft convention
315
+ '**/test/*.ts',
316
+ '**/test/*.tsx'
317
+ ],
318
+ rules: {}
319
+ }
320
+ ]
321
+ };
@@ -0,0 +1,23 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "name": "Hosted workbench",
6
+ "type": "msedge",
7
+ "request": "launch",
8
+ "url": "https://{tenantDomain}/_layouts/workbench.aspx",
9
+ "webRoot": "${workspaceRoot}",
10
+ "sourceMaps": true,
11
+ "sourceMapPathOverrides": {
12
+ "webpack:///.././src/*": "${webRoot}/src/*",
13
+ "webpack:///../../../src/*": "${webRoot}/src/*",
14
+ "webpack:///../../../../src/*": "${webRoot}/src/*",
15
+ "webpack:///../../../../../src/*": "${webRoot}/src/*"
16
+ },
17
+ "runtimeArgs": [
18
+ "--remote-debugging-port=9222",
19
+ "-incognito"
20
+ ]
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1,14 @@
1
+ // Place your settings in this file to overwrite default and user settings.
2
+ {
3
+ // Configure glob patterns for excluding files and folders in the file explorer.
4
+ "files.exclude": {
5
+ "**/.git": true,
6
+ "**/.DS_Store": true,
7
+ "**/bower_components": true,
8
+ "**/coverage": true,
9
+ "**/jest-output": true,
10
+ "**/lib-amd": true,
11
+ "src/**/*.scss.ts": true
12
+ },
13
+ "typescript.tsdk": ".\\node_modules\\typescript\\lib"
14
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "@microsoft/generator-sharepoint": {
3
+ "useGulp": false,
4
+ "plusBeta": false,
5
+ "isCreatingSolution": true,
6
+ "nodeVersion": "22.16.0",
7
+ "sdksVersions": {},
8
+ "version": "1.22.2",
9
+ "libraryName": "__PROJECT_NAME_LOWER__",
10
+ "libraryId": "5ee544fa-223e-415c-a17c-3555c718f10d",
11
+ "environment": "spo",
12
+ "packageManager": "npm",
13
+ "solutionName": "__PROJECT_NAME_LOWER__",
14
+ "solutionShortDescription": "__PROJECT_NAME_LOWER__ description",
15
+ "skipFeatureDeployment": true,
16
+ "isDomainIsolated": false,
17
+ "componentType": "webpart"
18
+ }
19
+ }