@andrewt03/eslint-typescript-rules 0.0.56 → 0.0.58
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 +1 -1
- package/dist/index.mjs +1 -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
|
@@ -253,7 +253,7 @@ var TYPESCRIPT_ESLINT_CONFIG_RULES = {
|
|
|
253
253
|
"@typescript-eslint/naming-convention": [
|
|
254
254
|
"error",
|
|
255
255
|
{
|
|
256
|
-
selector: ["variable", "
|
|
256
|
+
selector: ["variable", "classProperty", "parameter"],
|
|
257
257
|
types: ["boolean"],
|
|
258
258
|
format: ["PascalCase"],
|
|
259
259
|
prefix: ["is", "should", "has", "can", "will", "needs"]
|
package/dist/index.mjs
CHANGED
|
@@ -219,7 +219,7 @@ var TYPESCRIPT_ESLINT_CONFIG_RULES = {
|
|
|
219
219
|
"@typescript-eslint/naming-convention": [
|
|
220
220
|
"error",
|
|
221
221
|
{
|
|
222
|
-
selector: ["variable", "
|
|
222
|
+
selector: ["variable", "classProperty", "parameter"],
|
|
223
223
|
types: ["boolean"],
|
|
224
224
|
format: ["PascalCase"],
|
|
225
225
|
prefix: ["is", "should", "has", "can", "will", "needs"]
|
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.58",
|
|
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",
|