@umijs/lint 4.0.0-rc.11

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 (37) hide show
  1. package/README.md +3 -0
  2. package/compiled/postcss-less/LICENSE +24 -0
  3. package/compiled/postcss-less/index.js +1 -0
  4. package/compiled/postcss-less/package.json +1 -0
  5. package/compiled/stylelint-config-css-modules/index.js +1 -0
  6. package/compiled/stylelint-config-css-modules/package.json +1 -0
  7. package/compiled/stylelint-config-prettier/LICENSE +22 -0
  8. package/compiled/stylelint-config-prettier/index.js +1 -0
  9. package/compiled/stylelint-config-prettier/package.json +1 -0
  10. package/compiled/stylelint-declaration-block-no-ignored-properties/LICENSE +21 -0
  11. package/compiled/stylelint-declaration-block-no-ignored-properties/index.js +75 -0
  12. package/compiled/stylelint-declaration-block-no-ignored-properties/package.json +1 -0
  13. package/dist/config/eslint/index.d.ts +1 -0
  14. package/dist/config/eslint/index.js +60 -0
  15. package/dist/config/eslint/legacy.d.ts +1 -0
  16. package/dist/config/eslint/legacy.js +58 -0
  17. package/dist/config/eslint/rules/fabric.d.ts +86 -0
  18. package/dist/config/eslint/rules/fabric.js +90 -0
  19. package/dist/config/eslint/rules/recommended.d.ts +93 -0
  20. package/dist/config/eslint/rules/recommended.js +109 -0
  21. package/dist/config/eslint/setup.d.ts +0 -0
  22. package/dist/config/eslint/setup.js +3 -0
  23. package/dist/config/stylelint/index.d.ts +0 -0
  24. package/dist/config/stylelint/index.js +34 -0
  25. package/dist/index.d.ts +4 -0
  26. package/dist/index.js +29 -0
  27. package/dist/linter/base.d.ts +27 -0
  28. package/dist/linter/base.js +51 -0
  29. package/dist/linter/eslint.d.ts +9 -0
  30. package/dist/linter/eslint.js +23 -0
  31. package/dist/linter/index.d.ts +2 -0
  32. package/dist/linter/index.js +10 -0
  33. package/dist/linter/stylelint.d.ts +9 -0
  34. package/dist/linter/stylelint.js +26 -0
  35. package/dist/types.d.ts +10 -0
  36. package/dist/types.js +2 -0
  37. package/package.json +64 -0
@@ -0,0 +1,9 @@
1
+ import type { ILintArgs } from '../types';
2
+ import BaseLinter from './base';
3
+ /**
4
+ * linter for drive eslint
5
+ */
6
+ export default class Eslinter extends BaseLinter {
7
+ linter: string;
8
+ getRunArgs(args: ILintArgs): string[];
9
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const base_1 = __importDefault(require("./base"));
7
+ /**
8
+ * linter for drive eslint
9
+ */
10
+ class Eslinter extends base_1.default {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.linter = 'eslint';
14
+ }
15
+ getRunArgs(args) {
16
+ return [
17
+ '--quiet',
18
+ ...(args.fix ? ['--fix'] : []),
19
+ ...args._,
20
+ ];
21
+ }
22
+ }
23
+ exports.default = Eslinter;
@@ -0,0 +1,2 @@
1
+ export { default as EsLinter } from './eslint';
2
+ export { default as StyleLinter } from './stylelint';
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.StyleLinter = exports.EsLinter = void 0;
7
+ var eslint_1 = require("./eslint");
8
+ Object.defineProperty(exports, "EsLinter", { enumerable: true, get: function () { return __importDefault(eslint_1).default; } });
9
+ var stylelint_1 = require("./stylelint");
10
+ Object.defineProperty(exports, "StyleLinter", { enumerable: true, get: function () { return __importDefault(stylelint_1).default; } });
@@ -0,0 +1,9 @@
1
+ import type { ILintArgs } from '../types';
2
+ import BaseLinter from './base';
3
+ /**
4
+ * linter for drive stylelint
5
+ */
6
+ export default class StyleLinter extends BaseLinter {
7
+ linter: string;
8
+ getRunArgs(args: ILintArgs): string[];
9
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const base_1 = __importDefault(require("./base"));
7
+ /**
8
+ * linter for drive stylelint
9
+ */
10
+ class StyleLinter extends base_1.default {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.linter = 'stylelint';
14
+ }
15
+ getRunArgs(args) {
16
+ return [
17
+ '--config-basedir',
18
+ this.paths.cwd,
19
+ '--quiet',
20
+ '--allow-empty-input',
21
+ ...(args.fix ? ['--fix'] : []),
22
+ ...args._,
23
+ ];
24
+ }
25
+ }
26
+ exports.default = StyleLinter;
@@ -0,0 +1,10 @@
1
+ export interface ILinterOpts {
2
+ cwd: string;
3
+ }
4
+ export interface ILintArgs {
5
+ _: string[];
6
+ fix?: boolean;
7
+ eslintOnly?: boolean;
8
+ stylelintOnly?: boolean;
9
+ cssinjs?: boolean;
10
+ }
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@umijs/lint",
3
+ "version": "4.0.0-rc.11",
4
+ "description": "@umijs/lint",
5
+ "homepage": "https://github.com/umijs/umi-next/tree/master/packages/lint#readme",
6
+ "bugs": "https://github.com/umijs/umi-next/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/umijs/umi-next"
10
+ },
11
+ "license": "MIT",
12
+ "main": "dist/index.js",
13
+ "types": "dist/index.d.ts",
14
+ "files": [
15
+ "compiled",
16
+ "dist"
17
+ ],
18
+ "scripts": {
19
+ "build": "pnpm tsc",
20
+ "build:deps": "pnpm esno ../../scripts/bundleDeps.ts",
21
+ "dev": "pnpm build -- --watch"
22
+ },
23
+ "dependencies": {
24
+ "@babel/core": "7.17.7",
25
+ "@babel/eslint-parser": "7.17.0",
26
+ "@rushstack/eslint-patch": "1.1.1",
27
+ "@stylelint/postcss-css-in-js": "^0.37.2",
28
+ "@typescript-eslint/eslint-plugin": "5.16.0",
29
+ "@typescript-eslint/parser": "5.16.0",
30
+ "@umijs/babel-preset-umi": "4.0.0-rc.11",
31
+ "eslint-plugin-jest": "26.1.2",
32
+ "eslint-plugin-react": "7.29.4",
33
+ "eslint-plugin-react-hooks": "4.3.0",
34
+ "postcss": "^8.4.12",
35
+ "postcss-syntax": "0.36.2",
36
+ "stylelint-config-standard": "25.0.0"
37
+ },
38
+ "devDependencies": {
39
+ "postcss-less": "6.0.0",
40
+ "stylelint-config-css-modules": "4.1.0",
41
+ "stylelint-config-prettier": "9.0.3",
42
+ "stylelint-declaration-block-no-ignored-properties": "2.5.0"
43
+ },
44
+ "publishConfig": {
45
+ "access": "public"
46
+ },
47
+ "authors": [
48
+ "chencheng <sorrycc@gmail.com> (https://github.com/sorrycc)"
49
+ ],
50
+ "compiledConfig": {
51
+ "deps": [
52
+ "postcss-less",
53
+ "stylelint-config-css-modules",
54
+ "stylelint-config-prettier",
55
+ "stylelint-declaration-block-no-ignored-properties"
56
+ ],
57
+ "excludeDtsDeps": [
58
+ "postcss-less",
59
+ "stylelint-config-css-modules",
60
+ "stylelint-config-prettier",
61
+ "stylelint-declaration-block-no-ignored-properties"
62
+ ]
63
+ }
64
+ }