@matrixai/lint 0.2.8 → 0.2.9

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 CHANGED
@@ -1,12 +1,16 @@
1
1
  # js-lint
2
2
 
3
- A batteries-included, TypeScript-aware linting CLI and ESLint flat config bundle for use in Matrix AI JavaScript/TypeScript projects.
3
+ A batteries-included, TypeScript-aware linting CLI and ESLint flat config bundle
4
+ for use in Matrix AI JavaScript/TypeScript projects.
4
5
 
5
- - Type-aware linting powered by `@typescript-eslint` using one or more `tsconfig.json` files
6
- - Built-in support for React, Tailwind, JSX a11y, Prettier, and Matrix AI custom rules
6
+ - Type-aware linting powered by `@typescript-eslint` using one or more
7
+ `tsconfig.json` files
8
+ - Built-in support for React, Tailwind, JSX a11y, Prettier, and Matrix AI custom
9
+ rules
7
10
  - Supports Prettier formatting for Markdown and ShellCheck for shell scripts
8
11
  - Single command to lint JavaScript/TypeScript, Markdown, and shell scripts
9
- - Customizable via `matrixai-lint-config.json` and extensible with your own ESLint config
12
+ - Customizable via `matrixai-lint-config.json` and extensible with your own
13
+ ESLint config
10
14
  - CLI options to override config and enable auto-fix
11
15
 
12
16
  ## Installation
@@ -46,7 +50,8 @@ matrixai-lint --config ./eslint.config.js --fix
46
50
 
47
51
  ### TypeScript Support
48
52
 
49
- The linter is TypeScript-aware and requires a `tsconfig.json` to determine which files to lint and how to parse them.
53
+ The linter is TypeScript-aware and requires a `tsconfig.json` to determine which
54
+ files to lint and how to parse them.
50
55
 
51
56
  By default:
52
57
 
@@ -55,7 +60,9 @@ By default:
55
60
 
56
61
  ### Working with multiple tsconfigs
57
62
 
58
- If your project uses more than one `tsconfig.json` or doesn't have one at the root, you can configure the linter using a `matrixai-lint-config.json` file at the root:
63
+ If your project uses more than one `tsconfig.json` or doesn't have one at the
64
+ root, you can configure the linter using a `matrixai-lint-config.json` file at
65
+ the root:
59
66
 
60
67
  ```json
61
68
  {
@@ -69,7 +76,8 @@ If your project uses more than one `tsconfig.json` or doesn't have one at the ro
69
76
  | `tsconfigPaths` | `string[]` | One or more paths to `tsconfig.json` files |
70
77
  | `forceInclude` | `string[]` | Paths to always include, even if excluded by tsconfig (must be included by at least one) |
71
78
 
72
- > ⚠ If a path in `forceInclude` is not included in any of the `tsconfigPaths`, TypeScript will throw a parsing error.
79
+ > ⚠ If a path in `forceInclude` is not included in any of the `tsconfigPaths`,
80
+ > TypeScript will throw a parsing error.
73
81
 
74
82
  ### ESLint Config Override
75
83
 
@@ -100,14 +108,14 @@ Valid config filenames:
100
108
 
101
109
  ```ts
102
110
  // eslint.config.js
103
- import matrixai from '@matrixai/lint/config';
111
+ import matrixai from "@matrixai/lint/config";
104
112
 
105
113
  export default [
106
114
  ...matrixai,
107
115
  {
108
116
  rules: {
109
- '@typescript-eslint/no-explicit-any': 'error',
110
- 'no-console': 'off',
117
+ "@typescript-eslint/no-explicit-any": "error",
118
+ "no-console": "off",
111
119
  },
112
120
  },
113
121
  ];
package/dist/bin/lint.js CHANGED
@@ -5,11 +5,14 @@ import process from 'node:process';
5
5
  import childProcess from 'node:child_process';
6
6
  import fs from 'node:fs';
7
7
  import { createRequire } from 'node:module';
8
+ import url from 'node:url';
8
9
  import { Command } from 'commander';
9
10
  import * as utils from '../utils.js';
10
11
  const platform = os.platform();
11
12
  const program = new Command();
12
13
  const DEFAULT_SHELLCHECK_SEARCH_ROOTS = ['./src', './scripts', './tests'];
14
+ const dirname = path.dirname(url.fileURLToPath(import.meta.url));
15
+ const builtinPrettierCfg = path.resolve(dirname, '../configs/prettier.config.mjs');
13
16
  program
14
17
  .name('matrixai-lint')
15
18
  .description('Lint source files, scripts, and markdown with configured rules.')
@@ -114,7 +117,15 @@ async function main(argv = process.argv) {
114
117
  console.warn('Skipping Prettier: no Markdown/MDX files found.');
115
118
  return;
116
119
  }
117
- const prettierArgs = [fix ? '--write' : '--check', ...markdownFiles];
120
+ const prettierArgs = [
121
+ '--config',
122
+ builtinPrettierCfg,
123
+ '--config-precedence',
124
+ 'cli-override',
125
+ '--no-editorconfig',
126
+ fix ? '--write' : '--check',
127
+ ...markdownFiles,
128
+ ];
118
129
  console.error('Running prettier:');
119
130
  const require = createRequire(import.meta.url);
120
131
  let prettierBin = null;
@@ -127,7 +138,7 @@ async function main(argv = process.argv) {
127
138
  }
128
139
  try {
129
140
  if (prettierBin) {
130
- console.error(` ${process.execPath} ${prettierBin} ${prettierArgs.join(' ')}`);
141
+ console.error(` ${prettierBin} \n ${prettierArgs.join('\n' + ' ')}`);
131
142
  childProcess.execFileSync(process.execPath, [prettierBin, ...prettierArgs], {
132
143
  stdio: 'inherit',
133
144
  windowsHide: true,
@@ -136,7 +147,7 @@ async function main(argv = process.argv) {
136
147
  });
137
148
  }
138
149
  else {
139
- console.error(' prettier ' + prettierArgs.join(' '));
150
+ console.error('prettier' + prettierArgs.join('\n' + ' '));
140
151
  childProcess.execFileSync('prettier', prettierArgs, {
141
152
  stdio: 'inherit',
142
153
  windowsHide: true,
@@ -1 +1 @@
1
- {"version":3,"file":"lint.js","sourceRoot":"","sources":["../../src/bin/lint.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AAErC,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;AAC/B,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAC9B,MAAM,+BAA+B,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;AAE1E,OAAO;KACJ,IAAI,CA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KAAK,CAAC,wBAAwB,CAAC,CAAC;YACxC,UAAU,GAAG,IAAI,CAAC;SACnB;aAAM;YACL,MAAM,GAAG,CAAC,CAAC,iCAAiC;SAC7C;KACF;IAED,IAAI,UAAU,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACrD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;SAAM;QACL,OAAO,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;KACtD;AACH,CAAC;AAED,8BAA8B;AAE9B,eAAe,IAAI,CAAC;AAEpB,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;IACvC,KAAK,IAAI,EAAE,CAAC;CACb"}
@@ -1,9 +1,9 @@
1
- import type { EcmaVersion } from '@typescript-eslint/utils/ts-eslint';
2
- import tsParser from '@typescript-eslint/parser';
1
+ import type { EcmaVersion } from "@typescript-eslint/utils/ts-eslint";
2
+ import tsParser from "@typescript-eslint/parser";
3
3
  declare const config: (import("eslint").Linter.Config<import("eslint").Linter.RulesRecord> | {
4
4
  plugins: {
5
5
  import: import("eslint").ESLint.Plugin;
6
- '@matrixai': {
6
+ "@matrixai": {
7
7
  meta: {
8
8
  name: string;
9
9
  version: string;
@@ -825,7 +825,7 @@ declare const config: (import("eslint").Linter.Config<import("eslint").Linter.Ru
825
825
  };
826
826
  };
827
827
  rules: {
828
- '@matrixai/no-aliased-imports': (string | {
828
+ "@matrixai/no-aliased-imports": (string | {
829
829
  aliases: {
830
830
  prefix: string;
831
831
  target: string;
@@ -833,65 +833,65 @@ declare const config: (import("eslint").Linter.Config<import("eslint").Linter.Ru
833
833
  includeFolders: string[];
834
834
  autoFix: boolean;
835
835
  })[];
836
- 'react/react-in-jsx-scope': number;
837
- 'react/no-unknown-property': string;
838
- 'react/button-has-type': string;
839
- 'react/no-unused-prop-types': string;
840
- 'react/jsx-pascal-case': string;
841
- 'react/jsx-no-script-url': string;
842
- 'react/no-children-prop': string;
843
- 'react/no-danger': string;
844
- 'react/no-danger-with-children': string;
845
- 'react/no-unstable-nested-components': (string | {
836
+ "react/react-in-jsx-scope": number;
837
+ "react/no-unknown-property": string;
838
+ "react/button-has-type": string;
839
+ "react/no-unused-prop-types": string;
840
+ "react/jsx-pascal-case": string;
841
+ "react/jsx-no-script-url": string;
842
+ "react/no-children-prop": string;
843
+ "react/no-danger": string;
844
+ "react/no-danger-with-children": string;
845
+ "react/no-unstable-nested-components": (string | {
846
846
  allowAsProps: boolean;
847
847
  })[];
848
- 'react/jsx-fragments': string;
849
- 'react/destructuring-assignment': (string | {
848
+ "react/jsx-fragments": string;
849
+ "react/destructuring-assignment": (string | {
850
850
  destructureInSignature: string;
851
851
  })[];
852
- 'react/jsx-no-leaked-render': (string | {
852
+ "react/jsx-no-leaked-render": (string | {
853
853
  validStrategies: string[];
854
854
  })[];
855
- 'react/function-component-definition': (string | {
855
+ "react/function-component-definition": (string | {
856
856
  namedComponents: string;
857
857
  })[];
858
- 'react/jsx-key': (string | {
858
+ "react/jsx-key": (string | {
859
859
  checkFragmentShorthand: boolean;
860
860
  checkKeyMustBeforeSpread: boolean;
861
861
  warnOnDuplicates: boolean;
862
862
  })[];
863
- 'react/jsx-no-useless-fragment': string;
864
- 'react/jsx-curly-brace-presence': string;
865
- 'react/no-typos': string;
866
- 'react/display-name': string;
867
- 'react/jsx-sort-props': string;
868
- 'react/jsx-one-expression-per-line': string;
869
- 'react/prop-types': string;
870
- '@typescript-eslint/no-floating-promises': (string | {
863
+ "react/jsx-no-useless-fragment": string;
864
+ "react/jsx-curly-brace-presence": string;
865
+ "react/no-typos": string;
866
+ "react/display-name": string;
867
+ "react/jsx-sort-props": string;
868
+ "react/jsx-one-expression-per-line": string;
869
+ "react/prop-types": string;
870
+ "@typescript-eslint/no-floating-promises": (string | {
871
871
  ignoreVoid: boolean;
872
872
  ignoreIIFE: boolean;
873
873
  })[];
874
- '@typescript-eslint/no-misused-promises': (string | {
874
+ "@typescript-eslint/no-misused-promises": (string | {
875
875
  checksVoidReturn: boolean;
876
876
  })[];
877
- '@typescript-eslint/await-thenable': string[];
878
- '@typescript-eslint/no-empty-object-type': string;
879
- '@typescript-eslint/no-unsafe-declaration-merging': string;
880
- 'linebreak-style': string[];
881
- 'no-empty': number;
882
- 'no-useless-catch': number;
883
- 'no-prototype-builtins': number;
884
- 'no-constant-condition': number;
885
- 'no-useless-escape': number;
886
- 'no-console': string;
887
- 'no-restricted-globals': (string | {
877
+ "@typescript-eslint/await-thenable": string[];
878
+ "@typescript-eslint/no-empty-object-type": string;
879
+ "@typescript-eslint/no-unsafe-declaration-merging": string;
880
+ "linebreak-style": string[];
881
+ "no-empty": number;
882
+ "no-useless-catch": number;
883
+ "no-prototype-builtins": number;
884
+ "no-constant-condition": number;
885
+ "no-useless-escape": number;
886
+ "no-console": string;
887
+ "no-restricted-globals": (string | {
888
888
  name: string;
889
889
  message: string;
890
890
  })[];
891
- 'prefer-rest-params': number;
892
- 'require-yield': number;
891
+ "prefer-rest-params": number;
892
+ "require-yield": number;
893
893
  eqeqeq: string[];
894
- 'spaced-comment': (string | {
894
+ "spaced-comment": (string | {
895
895
  line: {
896
896
  exceptions: string[];
897
897
  };
@@ -900,39 +900,39 @@ declare const config: (import("eslint").Linter.Config<import("eslint").Linter.Ru
900
900
  };
901
901
  markers: string[];
902
902
  })[];
903
- 'capitalized-comments': (string | {
903
+ "capitalized-comments": (string | {
904
904
  ignoreInlineComments: boolean;
905
905
  ignoreConsecutiveComments: boolean;
906
906
  })[];
907
907
  curly: string[];
908
- 'import/order': (string | {
908
+ "import/order": (string | {
909
909
  groups: string[];
910
910
  pathGroups: {
911
911
  pattern: string;
912
912
  group: string;
913
913
  }[];
914
914
  pathGroupsExcludedImportTypes: string[];
915
- 'newlines-between': string;
915
+ "newlines-between": string;
916
916
  })[];
917
- '@typescript-eslint/no-require-imports': number;
918
- '@typescript-eslint/no-namespace': number;
919
- '@typescript-eslint/no-explicit-any': number;
920
- '@typescript-eslint/explicit-module-boundary-types': number;
921
- '@typescript-eslint/no-unused-vars': (string | {
917
+ "@typescript-eslint/no-require-imports": number;
918
+ "@typescript-eslint/no-namespace": number;
919
+ "@typescript-eslint/no-explicit-any": number;
920
+ "@typescript-eslint/explicit-module-boundary-types": number;
921
+ "@typescript-eslint/no-unused-vars": (string | {
922
922
  varsIgnorePattern: string;
923
923
  argsIgnorePattern: string;
924
924
  })[];
925
- '@typescript-eslint/no-inferrable-types': number;
926
- '@typescript-eslint/no-non-null-assertion': number;
927
- '@typescript-eslint/no-this-alias': number;
928
- '@typescript-eslint/no-var-requires': number;
929
- '@typescript-eslint/no-empty-function': number;
930
- '@typescript-eslint/no-empty-interface': number;
931
- '@typescript-eslint/consistent-type-imports': string[];
932
- '@typescript-eslint/consistent-type-exports': string[];
933
- 'no-throw-literal': string;
934
- '@typescript-eslint/no-throw-literal': string;
935
- '@typescript-eslint/naming-convention': (string | {
925
+ "@typescript-eslint/no-inferrable-types": number;
926
+ "@typescript-eslint/no-non-null-assertion": number;
927
+ "@typescript-eslint/no-this-alias": number;
928
+ "@typescript-eslint/no-var-requires": number;
929
+ "@typescript-eslint/no-empty-function": number;
930
+ "@typescript-eslint/no-empty-interface": number;
931
+ "@typescript-eslint/consistent-type-imports": string[];
932
+ "@typescript-eslint/consistent-type-exports": string[];
933
+ "no-throw-literal": string;
934
+ "@typescript-eslint/no-throw-literal": string;
935
+ "@typescript-eslint/naming-convention": (string | {
936
936
  selector: string;
937
937
  format: string[];
938
938
  leadingUnderscore: string;
@@ -953,8 +953,8 @@ declare const config: (import("eslint").Linter.Config<import("eslint").Linter.Ru
953
953
  leadingUnderscore?: undefined;
954
954
  trailingUnderscore?: undefined;
955
955
  })[];
956
- '@typescript-eslint/ban-ts-comment': (string | {
957
- 'ts-ignore': string;
956
+ "@typescript-eslint/ban-ts-comment": (string | {
957
+ "ts-ignore": string;
958
958
  })[];
959
959
  };
960
960
  })[];
@@ -1,13 +1,13 @@
1
- import path from 'node:path';
2
- import { fileURLToPath } from 'node:url';
3
- import globals from 'globals';
4
- import _import from 'eslint-plugin-import';
5
- import js from '@eslint/js';
6
- import tsParser from '@typescript-eslint/parser';
7
- import { FlatCompat } from '@eslint/eslintrc';
8
- import { fixupPluginRules } from '@eslint/compat';
9
- import matrixaiPlugin from '../plugins/eslint-plugin-matrixai.js';
10
- import { resolveMatrixConfig } from '../utils.js';
1
+ import path from "node:path";
2
+ import { fileURLToPath } from "node:url";
3
+ import globals from "globals";
4
+ import _import from "eslint-plugin-import";
5
+ import js from "@eslint/js";
6
+ import tsParser from "@typescript-eslint/parser";
7
+ import { FlatCompat } from "@eslint/eslintrc";
8
+ import { fixupPluginRules } from "@eslint/compat";
9
+ import matrixaiPlugin from "../plugins/eslint-plugin-matrixai.js";
10
+ import { resolveMatrixConfig } from "../utils.js";
11
11
  const filename = fileURLToPath(import.meta.url);
12
12
  const dirname = path.dirname(filename);
13
13
  const compat = new FlatCompat({
@@ -16,15 +16,15 @@ const compat = new FlatCompat({
16
16
  allConfig: js.configs.all,
17
17
  });
18
18
  const config = [
19
- ...compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', 'plugin:react/recommended', 'plugin:react-hooks/recommended', 'plugin:tailwindcss/recommended', 'plugin:jsx-a11y/recommended'),
19
+ ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended", "plugin:react/recommended", "plugin:react-hooks/recommended", "plugin:tailwindcss/recommended", "plugin:jsx-a11y/recommended"),
20
20
  {
21
21
  plugins: {
22
22
  import: fixupPluginRules(_import),
23
- '@matrixai': matrixaiPlugin,
23
+ "@matrixai": matrixaiPlugin,
24
24
  },
25
25
  settings: {
26
26
  react: {
27
- version: 'detect',
27
+ version: "detect",
28
28
  },
29
29
  },
30
30
  languageOptions: {
@@ -36,207 +36,207 @@ const config = [
36
36
  },
37
37
  parser: tsParser,
38
38
  ecmaVersion: 5,
39
- sourceType: 'module',
39
+ sourceType: "module",
40
40
  parserOptions: {
41
41
  project: resolveMatrixConfig().tsconfigPaths,
42
42
  },
43
43
  },
44
44
  rules: {
45
45
  // MatrixAI rules
46
- '@matrixai/no-aliased-imports': [
47
- 'error',
46
+ "@matrixai/no-aliased-imports": [
47
+ "error",
48
48
  {
49
- aliases: [{ prefix: '#', target: 'src' }],
50
- includeFolders: ['src'],
49
+ aliases: [{ prefix: "#", target: "src" }],
50
+ includeFolders: ["src"],
51
51
  autoFix: true,
52
52
  },
53
53
  ],
54
54
  // React rules
55
- 'react/react-in-jsx-scope': 0,
56
- 'react/no-unknown-property': 'off',
57
- 'react/button-has-type': 'error',
58
- 'react/no-unused-prop-types': 'error',
59
- 'react/jsx-pascal-case': 'error',
60
- 'react/jsx-no-script-url': 'error',
61
- 'react/no-children-prop': 'error',
62
- 'react/no-danger': 'error',
63
- 'react/no-danger-with-children': 'error',
64
- 'react/no-unstable-nested-components': ['error', { allowAsProps: true }],
65
- 'react/jsx-fragments': 'error',
66
- 'react/destructuring-assignment': [
67
- 'error',
68
- 'always',
69
- { destructureInSignature: 'always' },
55
+ "react/react-in-jsx-scope": 0,
56
+ "react/no-unknown-property": "off",
57
+ "react/button-has-type": "error",
58
+ "react/no-unused-prop-types": "error",
59
+ "react/jsx-pascal-case": "error",
60
+ "react/jsx-no-script-url": "error",
61
+ "react/no-children-prop": "error",
62
+ "react/no-danger": "error",
63
+ "react/no-danger-with-children": "error",
64
+ "react/no-unstable-nested-components": ["error", { allowAsProps: true }],
65
+ "react/jsx-fragments": "error",
66
+ "react/destructuring-assignment": [
67
+ "error",
68
+ "always",
69
+ { destructureInSignature: "always" },
70
70
  ],
71
- 'react/jsx-no-leaked-render': ['error', { validStrategies: ['ternary'] }],
72
- 'react/function-component-definition': [
73
- 'warn',
74
- { namedComponents: 'arrow-function' },
71
+ "react/jsx-no-leaked-render": ["error", { validStrategies: ["ternary"] }],
72
+ "react/function-component-definition": [
73
+ "warn",
74
+ { namedComponents: "arrow-function" },
75
75
  ],
76
- 'react/jsx-key': [
77
- 'error',
76
+ "react/jsx-key": [
77
+ "error",
78
78
  {
79
79
  checkFragmentShorthand: true,
80
80
  checkKeyMustBeforeSpread: true,
81
81
  warnOnDuplicates: true,
82
82
  },
83
83
  ],
84
- 'react/jsx-no-useless-fragment': 'warn',
85
- 'react/jsx-curly-brace-presence': 'warn',
86
- 'react/no-typos': 'warn',
87
- 'react/display-name': 'warn',
88
- 'react/jsx-sort-props': 'warn',
89
- 'react/jsx-one-expression-per-line': 'off',
90
- 'react/prop-types': 'off',
91
- '@typescript-eslint/no-floating-promises': [
92
- 'error',
84
+ "react/jsx-no-useless-fragment": "warn",
85
+ "react/jsx-curly-brace-presence": "warn",
86
+ "react/no-typos": "warn",
87
+ "react/display-name": "warn",
88
+ "react/jsx-sort-props": "warn",
89
+ "react/jsx-one-expression-per-line": "off",
90
+ "react/prop-types": "off",
91
+ "@typescript-eslint/no-floating-promises": [
92
+ "error",
93
93
  {
94
94
  ignoreVoid: true,
95
95
  ignoreIIFE: true,
96
96
  },
97
97
  ],
98
- '@typescript-eslint/no-misused-promises': [
99
- 'error',
98
+ "@typescript-eslint/no-misused-promises": [
99
+ "error",
100
100
  {
101
101
  checksVoidReturn: false,
102
102
  },
103
103
  ],
104
- '@typescript-eslint/await-thenable': ['error'],
105
- '@typescript-eslint/no-empty-object-type': 'off',
106
- '@typescript-eslint/no-unsafe-declaration-merging': 'off',
107
- 'linebreak-style': ['error', 'unix'],
108
- 'no-empty': 1,
109
- 'no-useless-catch': 1,
110
- 'no-prototype-builtins': 1,
111
- 'no-constant-condition': 0,
112
- 'no-useless-escape': 0,
113
- 'no-console': 'error',
114
- 'no-restricted-globals': [
115
- 'error',
116
- {
117
- name: 'global',
118
- message: 'Use `globalThis` instead',
119
- },
120
- {
121
- name: 'window',
122
- message: 'Use `globalThis` instead',
104
+ "@typescript-eslint/await-thenable": ["error"],
105
+ "@typescript-eslint/no-empty-object-type": "off",
106
+ "@typescript-eslint/no-unsafe-declaration-merging": "off",
107
+ "linebreak-style": ["error", "unix"],
108
+ "no-empty": 1,
109
+ "no-useless-catch": 1,
110
+ "no-prototype-builtins": 1,
111
+ "no-constant-condition": 0,
112
+ "no-useless-escape": 0,
113
+ "no-console": "error",
114
+ "no-restricted-globals": [
115
+ "error",
116
+ {
117
+ name: "global",
118
+ message: "Use `globalThis` instead",
119
+ },
120
+ {
121
+ name: "window",
122
+ message: "Use `globalThis` instead",
123
123
  },
124
124
  ],
125
- 'prefer-rest-params': 0,
126
- 'require-yield': 0,
127
- eqeqeq: ['error', 'smart'],
128
- 'spaced-comment': [
129
- 'warn',
130
- 'always',
125
+ "prefer-rest-params": 0,
126
+ "require-yield": 0,
127
+ eqeqeq: ["error", "smart"],
128
+ "spaced-comment": [
129
+ "warn",
130
+ "always",
131
131
  {
132
132
  line: {
133
- exceptions: ['-'],
133
+ exceptions: ["-"],
134
134
  },
135
135
  block: {
136
- exceptions: ['*'],
136
+ exceptions: ["*"],
137
137
  },
138
- markers: ['/'],
138
+ markers: ["/"],
139
139
  },
140
140
  ],
141
- 'capitalized-comments': [
142
- 'warn',
143
- 'always',
141
+ "capitalized-comments": [
142
+ "warn",
143
+ "always",
144
144
  {
145
145
  ignoreInlineComments: true,
146
146
  ignoreConsecutiveComments: true,
147
147
  },
148
148
  ],
149
- curly: ['error', 'multi-line', 'consistent'],
150
- 'import/order': [
151
- 'error',
149
+ curly: ["error", "multi-line", "consistent"],
150
+ "import/order": [
151
+ "error",
152
152
  {
153
153
  groups: [
154
- 'type',
155
- 'builtin',
156
- 'external',
157
- 'internal',
158
- 'index',
159
- 'sibling',
160
- 'parent',
161
- 'object',
154
+ "type",
155
+ "builtin",
156
+ "external",
157
+ "internal",
158
+ "index",
159
+ "sibling",
160
+ "parent",
161
+ "object",
162
162
  ],
163
163
  pathGroups: [
164
164
  {
165
- pattern: '@',
166
- group: 'internal',
165
+ pattern: "@",
166
+ group: "internal",
167
167
  },
168
168
  {
169
- pattern: '@/**',
170
- group: 'internal',
169
+ pattern: "@/**",
170
+ group: "internal",
171
171
  },
172
172
  ],
173
- pathGroupsExcludedImportTypes: ['type'],
174
- 'newlines-between': 'never',
173
+ pathGroupsExcludedImportTypes: ["type"],
174
+ "newlines-between": "never",
175
175
  },
176
176
  ],
177
- '@typescript-eslint/no-require-imports': 0,
178
- '@typescript-eslint/no-namespace': 0,
179
- '@typescript-eslint/no-explicit-any': 0,
180
- '@typescript-eslint/explicit-module-boundary-types': 0,
181
- '@typescript-eslint/no-unused-vars': [
182
- 'warn',
177
+ "@typescript-eslint/no-require-imports": 0,
178
+ "@typescript-eslint/no-namespace": 0,
179
+ "@typescript-eslint/no-explicit-any": 0,
180
+ "@typescript-eslint/explicit-module-boundary-types": 0,
181
+ "@typescript-eslint/no-unused-vars": [
182
+ "warn",
183
183
  {
184
- varsIgnorePattern: '^_',
185
- argsIgnorePattern: '^_',
184
+ varsIgnorePattern: "^_",
185
+ argsIgnorePattern: "^_",
186
186
  },
187
187
  ],
188
- '@typescript-eslint/no-inferrable-types': 0,
189
- '@typescript-eslint/no-non-null-assertion': 0,
190
- '@typescript-eslint/no-this-alias': 0,
191
- '@typescript-eslint/no-var-requires': 0,
192
- '@typescript-eslint/no-empty-function': 0,
193
- '@typescript-eslint/no-empty-interface': 0,
194
- '@typescript-eslint/consistent-type-imports': ['error'],
195
- '@typescript-eslint/consistent-type-exports': ['error'],
196
- 'no-throw-literal': 'off',
197
- '@typescript-eslint/no-throw-literal': 'off',
198
- '@typescript-eslint/naming-convention': [
199
- 'error',
188
+ "@typescript-eslint/no-inferrable-types": 0,
189
+ "@typescript-eslint/no-non-null-assertion": 0,
190
+ "@typescript-eslint/no-this-alias": 0,
191
+ "@typescript-eslint/no-var-requires": 0,
192
+ "@typescript-eslint/no-empty-function": 0,
193
+ "@typescript-eslint/no-empty-interface": 0,
194
+ "@typescript-eslint/consistent-type-imports": ["error"],
195
+ "@typescript-eslint/consistent-type-exports": ["error"],
196
+ "no-throw-literal": "off",
197
+ "@typescript-eslint/no-throw-literal": "off",
198
+ "@typescript-eslint/naming-convention": [
199
+ "error",
200
200
  {
201
- selector: 'function',
202
- format: ['camelCase', 'PascalCase'],
203
- leadingUnderscore: 'allow',
204
- trailingUnderscore: 'allowSingleOrDouble',
201
+ selector: "function",
202
+ format: ["camelCase", "PascalCase"],
203
+ leadingUnderscore: "allow",
204
+ trailingUnderscore: "allowSingleOrDouble",
205
205
  },
206
206
  {
207
- selector: 'variable',
208
- format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
209
- leadingUnderscore: 'allow',
210
- trailingUnderscore: 'allowSingleOrDouble',
207
+ selector: "variable",
208
+ format: ["camelCase", "UPPER_CASE", "PascalCase"],
209
+ leadingUnderscore: "allow",
210
+ trailingUnderscore: "allowSingleOrDouble",
211
211
  },
212
212
  {
213
- selector: 'parameter',
214
- format: ['camelCase'],
215
- leadingUnderscore: 'allow',
216
- trailingUnderscore: 'allowSingleOrDouble',
213
+ selector: "parameter",
214
+ format: ["camelCase"],
215
+ leadingUnderscore: "allow",
216
+ trailingUnderscore: "allowSingleOrDouble",
217
217
  },
218
218
  {
219
- selector: 'typeLike',
220
- format: ['PascalCase'],
221
- trailingUnderscore: 'allowSingleOrDouble',
219
+ selector: "typeLike",
220
+ format: ["PascalCase"],
221
+ trailingUnderscore: "allowSingleOrDouble",
222
222
  },
223
223
  {
224
- selector: 'enumMember',
225
- format: ['PascalCase', 'UPPER_CASE'],
224
+ selector: "enumMember",
225
+ format: ["PascalCase", "UPPER_CASE"],
226
226
  },
227
227
  {
228
- selector: 'objectLiteralProperty',
228
+ selector: "objectLiteralProperty",
229
229
  format: null,
230
230
  },
231
231
  {
232
- selector: 'typeProperty',
232
+ selector: "typeProperty",
233
233
  format: null,
234
234
  },
235
235
  ],
236
- '@typescript-eslint/ban-ts-comment': [
237
- 'error',
236
+ "@typescript-eslint/ban-ts-comment": [
237
+ "error",
238
238
  {
239
- 'ts-ignore': 'allow-with-description',
239
+ "ts-ignore": "allow-with-description",
240
240
  },
241
241
  ],
242
242
  },
@@ -0,0 +1,14 @@
1
+ /** @type {import('prettier').Config} */
2
+ export const semi: import('prettier').Config;
3
+ export const trailingComma: "all";
4
+ export const singleQuote: true;
5
+ export const printWidth: 80;
6
+ export const tabWidth: 2;
7
+ export const useTabs: false;
8
+ export const endOfLine: "lf";
9
+ export const overrides: {
10
+ files: string[];
11
+ options: {
12
+ proseWrap: string;
13
+ };
14
+ }[];
@@ -0,0 +1,15 @@
1
+ /** @type {import('prettier').Config} */
2
+ export const semi = true;
3
+ export const trailingComma = "all";
4
+ export const singleQuote = true;
5
+ export const printWidth = 80;
6
+ export const tabWidth = 2;
7
+ export const useTabs = false;
8
+ export const endOfLine = "lf";
9
+ export const overrides = [
10
+ {
11
+ files: ["*.md", "*.mdx"],
12
+ options: { proseWrap: "always" },
13
+ },
14
+ ];
15
+ //# sourceMappingURL=prettier.config.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prettier.config.mjs","sourceRoot":"","sources":["../../src/configs/prettier.config.mjs"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC;AACzB,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC;AACnC,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC;AAChC,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAC;AAC7B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC;AAC1B,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC;AAC7B,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC;AAC9B,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB;QACE,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;QACxB,OAAO,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE;KACjC;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matrixai/lint",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "author": "Roger Qiu",
5
5
  "description": "Org wide custom eslint rules",
6
6
  "license": "Apache-2.0",