@jakubmazanec/eslint-config 4.1.11 → 4.1.12-unstable.9efdfd08

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,10 +1,40 @@
1
1
  "use strict";
2
+ import typescriptEslintParser from "@typescript-eslint/parser";
2
3
  import nEslintPlugin from "eslint-plugin-n";
3
4
  import globals from "globals";
4
- import { JS_AND_TS_EXTENSIONS } from "../constants.js";
5
+ import {
6
+ JS_AND_TS_EXTENSIONS,
7
+ JS_AND_TS_EXTENSIONS_GLOB_PART,
8
+ JS_EXTENSIONS_GLOB_PART,
9
+ TS_EXTENSIONS_GLOB_PART
10
+ } from "../constants.js";
5
11
  import { nodejsRules } from "../rules.js";
6
12
  export const nodejs = [
7
13
  {
14
+ linterOptions: {
15
+ reportUnusedDisableDirectives: "error"
16
+ }
17
+ },
18
+ {
19
+ files: [`**/*.${JS_EXTENSIONS_GLOB_PART}`],
20
+ languageOptions: {
21
+ ecmaVersion: 2024,
22
+ parserOptions: {
23
+ ecmaFeatures: { jsx: true }
24
+ }
25
+ }
26
+ },
27
+ {
28
+ files: [`**/*.${TS_EXTENSIONS_GLOB_PART}`],
29
+ languageOptions: {
30
+ parser: typescriptEslintParser,
31
+ parserOptions: {
32
+ project: "tsconfig.typecheck.json"
33
+ }
34
+ }
35
+ },
36
+ {
37
+ files: [`**/*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`],
8
38
  languageOptions: {
9
39
  globals: {
10
40
  ...globals.node
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../source/configs/nodejs.ts"],
4
- "sourcesContent": ["import {type default as eslint, type ESLint} from 'eslint';\nimport nEslintPlugin from 'eslint-plugin-n';\nimport globals from 'globals';\n\nimport {JS_AND_TS_EXTENSIONS} from '../constants.js';\nimport {nodejsRules} from '../rules.js';\n\nexport const nodejs: eslint.Linter.Config[] = [\n {\n languageOptions: {\n globals: {\n ...globals.node,\n },\n },\n // TODO: fix the type essertion\n plugins: {\n node: nEslintPlugin as ESLint.Plugin,\n },\n settings: {\n node: {\n tryExtensions: JS_AND_TS_EXTENSIONS,\n },\n },\n\n rules: {\n ...nodejsRules,\n },\n },\n];\n"],
5
- "mappings": ";AACA,OAAO,mBAAmB;AAC1B,OAAO,aAAa;AAEpB,SAAQ,4BAA2B;AACnC,SAAQ,mBAAkB;AAEnB,aAAM,SAAiC;AAAA,EAC5C;AAAA,IACE,iBAAiB;AAAA,MACf,SAAS;AAAA,QACP,GAAG,QAAQ;AAAA,MACb;AAAA,IACF;AAAA;AAAA,IAEA,SAAS;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,eAAe;AAAA,MACjB;AAAA,IACF;AAAA,IAEA,OAAO;AAAA,MACL,GAAG;AAAA,IACL;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import typescriptEslintParser from '@typescript-eslint/parser';\nimport {type default as eslint, type ESLint} from 'eslint';\nimport nEslintPlugin from 'eslint-plugin-n';\nimport globals from 'globals';\n\nimport {\n JS_AND_TS_EXTENSIONS,\n JS_AND_TS_EXTENSIONS_GLOB_PART,\n JS_EXTENSIONS_GLOB_PART,\n TS_EXTENSIONS_GLOB_PART,\n} from '../constants.js';\nimport {nodejsRules} from '../rules.js';\n\nexport const nodejs: eslint.Linter.Config[] = [\n {\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n },\n },\n {\n files: [`**/*.${JS_EXTENSIONS_GLOB_PART}`],\n\n languageOptions: {\n ecmaVersion: 2024,\n parserOptions: {\n ecmaFeatures: {jsx: true},\n },\n },\n },\n {\n files: [`**/*.${TS_EXTENSIONS_GLOB_PART}`],\n\n languageOptions: {\n parser: typescriptEslintParser,\n parserOptions: {\n project: 'tsconfig.typecheck.json',\n },\n },\n },\n {\n files: [`**/*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`],\n\n languageOptions: {\n globals: {\n ...globals.node,\n },\n },\n // TODO: fix the type essertion\n plugins: {\n node: nEslintPlugin as ESLint.Plugin,\n },\n settings: {\n node: {\n tryExtensions: JS_AND_TS_EXTENSIONS,\n },\n },\n\n rules: {\n ...nodejsRules,\n },\n },\n];\n"],
5
+ "mappings": ";AAAA,OAAO,4BAA4B;AAEnC,OAAO,mBAAmB;AAC1B,OAAO,aAAa;AAEpB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAQ,mBAAkB;AAEnB,aAAM,SAAiC;AAAA,EAC5C;AAAA,IACE,eAAe;AAAA,MACb,+BAA+B;AAAA,IACjC;AAAA,EACF;AAAA,EACA;AAAA,IACE,OAAO,CAAC,QAAQ,uBAAuB,EAAE;AAAA,IAEzC,iBAAiB;AAAA,MACf,aAAa;AAAA,MACb,eAAe;AAAA,QACb,cAAc,EAAC,KAAK,KAAI;AAAA,MAC1B;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,OAAO,CAAC,QAAQ,uBAAuB,EAAE;AAAA,IAEzC,iBAAiB;AAAA,MACf,QAAQ;AAAA,MACR,eAAe;AAAA,QACb,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,OAAO,CAAC,QAAQ,8BAA8B,EAAE;AAAA,IAEhD,iBAAiB;AAAA,MACf,SAAS;AAAA,QACP,GAAG,QAAQ;AAAA,MACb;AAAA,IACF;AAAA;AAAA,IAEA,SAAS;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,eAAe;AAAA,MACjB;AAAA,IACF;AAAA,IAEA,OAAO;AAAA,MACL,GAAG;AAAA,IACL;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,10 +1,40 @@
1
1
  "use strict";
2
+ import typescriptEslintParser from "@typescript-eslint/parser";
2
3
  import prettierEslintConfig from "eslint-config-prettier";
3
4
  import prettierEslintPlugin from "eslint-plugin-prettier";
5
+ import {
6
+ JS_AND_TS_EXTENSIONS_GLOB_PART,
7
+ JS_EXTENSIONS_GLOB_PART,
8
+ TS_EXTENSIONS_GLOB_PART
9
+ } from "../constants.js";
4
10
  import { prettierRules } from "../rules.js";
5
11
  export const prettier = [
12
+ {
13
+ linterOptions: {
14
+ reportUnusedDisableDirectives: "error"
15
+ }
16
+ },
6
17
  prettierEslintConfig,
7
18
  {
19
+ files: [`**/*.${JS_EXTENSIONS_GLOB_PART}`],
20
+ languageOptions: {
21
+ ecmaVersion: 2024,
22
+ parserOptions: {
23
+ ecmaFeatures: { jsx: true }
24
+ }
25
+ }
26
+ },
27
+ {
28
+ files: [`**/*.${TS_EXTENSIONS_GLOB_PART}`],
29
+ languageOptions: {
30
+ parser: typescriptEslintParser,
31
+ parserOptions: {
32
+ project: "tsconfig.typecheck.json"
33
+ }
34
+ }
35
+ },
36
+ {
37
+ files: [`**/*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`],
8
38
  plugins: {
9
39
  prettier: prettierEslintPlugin
10
40
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../source/configs/prettier.ts"],
4
- "sourcesContent": ["import {type default as eslint} from 'eslint';\nimport prettierEslintConfig from 'eslint-config-prettier';\nimport prettierEslintPlugin from 'eslint-plugin-prettier';\n\nimport {prettierRules} from '../rules.js';\n\nexport const prettier: eslint.Linter.Config[] = [\n prettierEslintConfig,\n {\n plugins: {\n prettier: prettierEslintPlugin,\n },\n\n rules: {\n ...prettierRules,\n },\n },\n];\n"],
5
- "mappings": ";AACA,OAAO,0BAA0B;AACjC,OAAO,0BAA0B;AAEjC,SAAQ,qBAAoB;AAErB,aAAM,WAAmC;AAAA,EAC9C;AAAA,EACA;AAAA,IACE,SAAS;AAAA,MACP,UAAU;AAAA,IACZ;AAAA,IAEA,OAAO;AAAA,MACL,GAAG;AAAA,IACL;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import typescriptEslintParser from '@typescript-eslint/parser';\nimport {type default as eslint} from 'eslint';\nimport prettierEslintConfig from 'eslint-config-prettier';\nimport prettierEslintPlugin from 'eslint-plugin-prettier';\n\nimport {\n JS_AND_TS_EXTENSIONS_GLOB_PART,\n JS_EXTENSIONS_GLOB_PART,\n TS_EXTENSIONS_GLOB_PART,\n} from '../constants.js';\nimport {prettierRules} from '../rules.js';\n\nexport const prettier: eslint.Linter.Config[] = [\n {\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n },\n },\n prettierEslintConfig,\n {\n files: [`**/*.${JS_EXTENSIONS_GLOB_PART}`],\n\n languageOptions: {\n ecmaVersion: 2024,\n parserOptions: {\n ecmaFeatures: {jsx: true},\n },\n },\n },\n {\n files: [`**/*.${TS_EXTENSIONS_GLOB_PART}`],\n\n languageOptions: {\n parser: typescriptEslintParser,\n parserOptions: {\n project: 'tsconfig.typecheck.json',\n },\n },\n },\n {\n files: [`**/*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`],\n\n plugins: {\n prettier: prettierEslintPlugin,\n },\n\n rules: {\n ...prettierRules,\n },\n },\n];\n"],
5
+ "mappings": ";AAAA,OAAO,4BAA4B;AAEnC,OAAO,0BAA0B;AACjC,OAAO,0BAA0B;AAEjC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAQ,qBAAoB;AAErB,aAAM,WAAmC;AAAA,EAC9C;AAAA,IACE,eAAe;AAAA,MACb,+BAA+B;AAAA,IACjC;AAAA,EACF;AAAA,EACA;AAAA,EACA;AAAA,IACE,OAAO,CAAC,QAAQ,uBAAuB,EAAE;AAAA,IAEzC,iBAAiB;AAAA,MACf,aAAa;AAAA,MACb,eAAe;AAAA,QACb,cAAc,EAAC,KAAK,KAAI;AAAA,MAC1B;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,OAAO,CAAC,QAAQ,uBAAuB,EAAE;AAAA,IAEzC,iBAAiB;AAAA,MACf,QAAQ;AAAA,MACR,eAAe;AAAA,QACb,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,OAAO,CAAC,QAAQ,8BAA8B,EAAE;AAAA,IAEhD,SAAS;AAAA,MACP,UAAU;AAAA,IACZ;AAAA,IAEA,OAAO;AAAA,MACL,GAAG;AAAA,IACL;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jakubmazanec/eslint-config",
3
- "version": "4.1.11",
3
+ "version": "4.1.12-unstable.9efdfd08",
4
4
  "description": "ESLint config for TypeScript projects.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,12 +1,45 @@
1
+ import typescriptEslintParser from '@typescript-eslint/parser';
1
2
  import {type default as eslint, type ESLint} from 'eslint';
2
3
  import nEslintPlugin from 'eslint-plugin-n';
3
4
  import globals from 'globals';
4
5
 
5
- import {JS_AND_TS_EXTENSIONS} from '../constants.js';
6
+ import {
7
+ JS_AND_TS_EXTENSIONS,
8
+ JS_AND_TS_EXTENSIONS_GLOB_PART,
9
+ JS_EXTENSIONS_GLOB_PART,
10
+ TS_EXTENSIONS_GLOB_PART,
11
+ } from '../constants.js';
6
12
  import {nodejsRules} from '../rules.js';
7
13
 
8
14
  export const nodejs: eslint.Linter.Config[] = [
9
15
  {
16
+ linterOptions: {
17
+ reportUnusedDisableDirectives: 'error',
18
+ },
19
+ },
20
+ {
21
+ files: [`**/*.${JS_EXTENSIONS_GLOB_PART}`],
22
+
23
+ languageOptions: {
24
+ ecmaVersion: 2024,
25
+ parserOptions: {
26
+ ecmaFeatures: {jsx: true},
27
+ },
28
+ },
29
+ },
30
+ {
31
+ files: [`**/*.${TS_EXTENSIONS_GLOB_PART}`],
32
+
33
+ languageOptions: {
34
+ parser: typescriptEslintParser,
35
+ parserOptions: {
36
+ project: 'tsconfig.typecheck.json',
37
+ },
38
+ },
39
+ },
40
+ {
41
+ files: [`**/*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`],
42
+
10
43
  languageOptions: {
11
44
  globals: {
12
45
  ...globals.node,
@@ -1,12 +1,45 @@
1
+ import typescriptEslintParser from '@typescript-eslint/parser';
1
2
  import {type default as eslint} from 'eslint';
2
3
  import prettierEslintConfig from 'eslint-config-prettier';
3
4
  import prettierEslintPlugin from 'eslint-plugin-prettier';
4
5
 
6
+ import {
7
+ JS_AND_TS_EXTENSIONS_GLOB_PART,
8
+ JS_EXTENSIONS_GLOB_PART,
9
+ TS_EXTENSIONS_GLOB_PART,
10
+ } from '../constants.js';
5
11
  import {prettierRules} from '../rules.js';
6
12
 
7
13
  export const prettier: eslint.Linter.Config[] = [
14
+ {
15
+ linterOptions: {
16
+ reportUnusedDisableDirectives: 'error',
17
+ },
18
+ },
8
19
  prettierEslintConfig,
9
20
  {
21
+ files: [`**/*.${JS_EXTENSIONS_GLOB_PART}`],
22
+
23
+ languageOptions: {
24
+ ecmaVersion: 2024,
25
+ parserOptions: {
26
+ ecmaFeatures: {jsx: true},
27
+ },
28
+ },
29
+ },
30
+ {
31
+ files: [`**/*.${TS_EXTENSIONS_GLOB_PART}`],
32
+
33
+ languageOptions: {
34
+ parser: typescriptEslintParser,
35
+ parserOptions: {
36
+ project: 'tsconfig.typecheck.json',
37
+ },
38
+ },
39
+ },
40
+ {
41
+ files: [`**/*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`],
42
+
10
43
  plugins: {
11
44
  prettier: prettierEslintPlugin,
12
45
  },