@andrewt03/eslint-typescript-rules 0.0.57 → 0.0.59
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/README.md +4 -2
- package/dist/index.js +12 -1
- package/dist/index.mjs +12 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -169,7 +169,7 @@ module.exports = [
|
|
|
169
169
|
|
|
170
170
|
#### Alternative - `ESModules`
|
|
171
171
|
|
|
172
|
-
- **Note:** In `ESModules`, the `__dirname` variable is not available. As a fix, in most cases, we can leverage `process.cwd()` in this case since the `ESLint` file configuration is typically written at the top-level of a project. However, if this does not work, some alternatives can be found in this [StackOverflow](https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules) post.
|
|
172
|
+
- **Note:** In `ESModules`, the `__dirname` variable is not available. As a fix, in most cases, we can leverage `import.meta.dirname` or `process.cwd()` in this case since the `ESLint` file configuration is typically written at the top-level of a project. However, if this does not work, some alternatives can be found in this [StackOverflow](https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules) post.
|
|
173
173
|
|
|
174
174
|
---
|
|
175
175
|
|
|
@@ -185,6 +185,8 @@ import angularEslintPlugin from "@angular-eslint/eslint-plugin";
|
|
|
185
185
|
import eslintReactPlugin from "eslint-plugin-react";
|
|
186
186
|
import eslintReactHooksPlugin from "eslint-plugin-react-hooks";
|
|
187
187
|
|
|
188
|
+
const DIR_NAME = import.meta.dirname;
|
|
189
|
+
|
|
188
190
|
export default [
|
|
189
191
|
{
|
|
190
192
|
ignores: ["**/dist"]
|
|
@@ -204,7 +206,7 @@ export default [
|
|
|
204
206
|
parser: tseslint.parser,
|
|
205
207
|
parserOptions: {
|
|
206
208
|
projectService: true,
|
|
207
|
-
tsconfigRootDir:
|
|
209
|
+
tsconfigRootDir: DIR_NAME,
|
|
208
210
|
|
|
209
211
|
// React-Specific (Omit if not necessary)
|
|
210
212
|
ecmaFeatures: {
|
package/dist/index.js
CHANGED
|
@@ -256,7 +256,18 @@ var TYPESCRIPT_ESLINT_CONFIG_RULES = {
|
|
|
256
256
|
selector: ["variable", "classProperty", "parameter"],
|
|
257
257
|
types: ["boolean"],
|
|
258
258
|
format: ["PascalCase"],
|
|
259
|
-
prefix: [
|
|
259
|
+
prefix: [
|
|
260
|
+
"is",
|
|
261
|
+
"should",
|
|
262
|
+
"has",
|
|
263
|
+
"can",
|
|
264
|
+
"could",
|
|
265
|
+
"needs",
|
|
266
|
+
"may",
|
|
267
|
+
"must",
|
|
268
|
+
"does",
|
|
269
|
+
"will"
|
|
270
|
+
]
|
|
260
271
|
}
|
|
261
272
|
]
|
|
262
273
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -222,7 +222,18 @@ var TYPESCRIPT_ESLINT_CONFIG_RULES = {
|
|
|
222
222
|
selector: ["variable", "classProperty", "parameter"],
|
|
223
223
|
types: ["boolean"],
|
|
224
224
|
format: ["PascalCase"],
|
|
225
|
-
prefix: [
|
|
225
|
+
prefix: [
|
|
226
|
+
"is",
|
|
227
|
+
"should",
|
|
228
|
+
"has",
|
|
229
|
+
"can",
|
|
230
|
+
"could",
|
|
231
|
+
"needs",
|
|
232
|
+
"may",
|
|
233
|
+
"must",
|
|
234
|
+
"does",
|
|
235
|
+
"will"
|
|
236
|
+
]
|
|
226
237
|
}
|
|
227
238
|
]
|
|
228
239
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andrewt03/eslint-typescript-rules",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.59",
|
|
4
4
|
"description": "Recommended ESLint Rules for general TypeScript, Node.js/Express.js, Angular, and React.js Projects",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|