@playcanvas/eslint-config 2.0.9 → 3.0.0-beta.0

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.
@@ -0,0 +1,16 @@
1
+ import pluginJsxA11y from 'eslint-plugin-jsx-a11y';
2
+ import pluginReact from 'eslint-plugin-react';
3
+ import pluginReactHooks from 'eslint-plugin-react-hooks';
4
+ export default [
5
+ pluginJsxA11y.flatConfigs.recommended,
6
+ pluginReact.configs.flat.recommended,
7
+ pluginReactHooks.configs.flat.recommended,
8
+ {
9
+ settings: {
10
+ react: {
11
+ version: 'detect',
12
+ },
13
+ },
14
+ },
15
+ ];
16
+ //# sourceMappingURL=react.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react.js","sourceRoot":"","sources":["../../src/configs/react.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,wBAAwB,CAAC;AACnD,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAC9C,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AAEzD,eAAe;IACX,aAAa,CAAC,WAAW,CAAC,WAAW;IACrC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW;IACpC,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW;IACzC;QACI,QAAQ,EAAE;YACN,KAAK,EAAE;gBACH,OAAO,EAAE,QAAQ;aACpB;SACJ;KACJ;CACJ,CAAC"}
@@ -0,0 +1,79 @@
1
+ import eslint from '@eslint/js';
2
+ import typescriptEslint from '@typescript-eslint/eslint-plugin';
3
+ import tsParser from '@typescript-eslint/parser';
4
+ import pluginImport from 'eslint-plugin-import';
5
+ import * as pluginPackageJson from 'eslint-plugin-package-json';
6
+ import pluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
7
+ import globals from 'globals';
8
+ import jsoncEslintParser from 'jsonc-eslint-parser';
9
+ import tseslint from 'typescript-eslint';
10
+ const ignoreConfig = {
11
+ ignores: ['**/node_modules', '**/dist'],
12
+ };
13
+ const baseConfig = {
14
+ rules: {
15
+ curly: ['error'],
16
+ 'import/order': [
17
+ 'error',
18
+ {
19
+ alphabetize: { order: 'asc', caseInsensitive: true },
20
+ 'newlines-between': 'always',
21
+ groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
22
+ },
23
+ ],
24
+ '@typescript-eslint/consistent-type-definitions': ['error', 'type'],
25
+ '@typescript-eslint/no-unused-vars': [
26
+ 'error',
27
+ {
28
+ argsIgnorePattern: '^_',
29
+ varsIgnorePattern: '^_',
30
+ caughtErrorsIgnorePattern: '^_',
31
+ },
32
+ ],
33
+ },
34
+ settings: {
35
+ 'import/resolver': {
36
+ typescript: true,
37
+ },
38
+ },
39
+ };
40
+ const tsFilesConfig = {
41
+ files: ['**/*.{js,mjs,ts}'],
42
+ plugins: {
43
+ '@typescript-eslint': typescriptEslint,
44
+ },
45
+ languageOptions: {
46
+ parser: tsParser,
47
+ ecmaVersion: 2022,
48
+ sourceType: 'module',
49
+ globals: globals.node,
50
+ },
51
+ rules: {
52
+ '@typescript-eslint/consistent-type-imports': 'error',
53
+ '@typescript-eslint/no-dynamic-delete': 'off',
54
+ '@typescript-eslint/no-non-null-assertion': 'off',
55
+ },
56
+ };
57
+ const packageJsonConfig = {
58
+ files: ['**/package.json', '**/package-lock.json'],
59
+ languageOptions: {
60
+ parser: jsoncEslintParser,
61
+ },
62
+ plugins: {
63
+ 'package-json': pluginPackageJson,
64
+ },
65
+ rules: pluginPackageJson.configs.recommended.rules,
66
+ };
67
+ export default [
68
+ eslint.configs.recommended,
69
+ ...tseslint.configs.recommended,
70
+ ...tseslint.configs.strict,
71
+ ...tseslint.configs.stylistic,
72
+ pluginPrettierRecommended,
73
+ pluginImport.flatConfigs.recommended,
74
+ ignoreConfig,
75
+ baseConfig,
76
+ tsFilesConfig,
77
+ packageJsonConfig,
78
+ ];
79
+ //# sourceMappingURL=typescript.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript.js","source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E;QACb,MAAM,EAAE,QAAQ;QAChB,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,OAAO,CAAC,IAAI;KACxB;IACD,KAAK,EAAE;QACH,4CAA4C,EAAE,OAAO;QACrD,sCAAsC,EAAE,KAAK;QAC7C,0CAA0C,EAAE,KAAK;KACpD;CACJ,CAAC;AAEF,MAAM,iBAAiB,GAAG;IACtB,KAAK,EAAE,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;IAClD,eAAe,EAAE;QACb,MAAM,EAAE,iBAAiB;KAC5B;IACD,OAAO,EAAE;QACL,cAAc,EAAE,iBAAiB;KACpC;IACD,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK;CACrD,CAAC;AAEF,eAAe;IACX,MAAM,CAAC,OAAO,CAAC,WAAW;IAC1B,GAAG,QAAQ,CAAC,OAAO,CAAC,WAAW;IAC/B,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM;IAC1B,GAAG,QAAQ,CAAC,OAAO,CAAC,SAAS;IAC7B,yBAAyB;IACzB,YAAY,CAAC,WAAW,CAAC,WAAW;IACpC,YAAY;IACZ,UAAU;IACV,aAAa;IACb,iBAAiB;CACpB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ import legacy from './configs/legacy.js';
2
+ import react from './configs/react.js';
3
+ import typescript from './configs/typescript.js';
4
+ export default {
5
+ legacy,
6
+ typescript,
7
+ react,
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,OAAO,KAAK,MAAM,oBAAoB,CAAC;AACvC,OAAO,UAAU,MAAM,yBAAyB,CAAC;AAEjD,eAAe;IACX,MAAM;IACN,UAAU;IACV,KAAK;CACR,CAAC"}
package/package.json CHANGED
@@ -1,38 +1,60 @@
1
1
  {
2
- "name": "@playcanvas/eslint-config",
3
- "version": "2.0.9",
4
- "author": "PlayCanvas <support@playcanvas.com>",
5
- "homepage": "https://playcanvas.com",
6
- "description": "ESLint configuration used by PlayCanvas",
7
- "keywords": [
8
- "config",
9
- "eslint",
10
- "playcanvas"
11
- ],
12
- "license": "MIT",
13
- "main": "eslint.config.mjs",
14
- "bugs": {
15
- "url": "https://github.com/playcanvas/playcanvas-eslint-config/issues"
16
- },
17
- "repository": {
18
- "type": "git",
19
- "url": "git+https://github.com/playcanvas/playcanvas-eslint-config.git"
20
- },
21
- "files": [
22
- "LICENSE",
23
- "eslint.config.mjs",
24
- "package.json",
25
- "README.md"
26
- ],
27
- "dependencies": {
28
- "eslint-plugin-import": "^2.31.0",
29
- "eslint-plugin-jsdoc": "^50.5.0",
30
- "eslint-plugin-regexp": "^2.7.0"
31
- },
32
- "scripts": {
33
- "test": "echo \"Error: no test specified\" && exit 1"
34
- },
35
- "peerDependencies": {
36
- "eslint": ">= 8"
37
- }
2
+ "name": "@playcanvas/eslint-config",
3
+ "version": "3.0.0-beta.0",
4
+ "description": "ESLint configuration used by PlayCanvas",
5
+ "keywords": [
6
+ "config",
7
+ "eslint",
8
+ "playcanvas"
9
+ ],
10
+ "homepage": "https://playcanvas.com",
11
+ "bugs": {
12
+ "url": "https://github.com/playcanvas/playcanvas-eslint-config/issues"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/playcanvas/playcanvas-eslint-config.git"
17
+ },
18
+ "license": "MIT",
19
+ "author": "PlayCanvas <support@playcanvas.com>",
20
+ "type": "module",
21
+ "main": "dist/index.js",
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "scripts": {
26
+ "build": "tsc",
27
+ "lint": "prettier --check . && eslint .",
28
+ "lint:fix": "prettier --write . && eslint --fix .",
29
+ "publint": "publint",
30
+ "watch": "tsc -w"
31
+ },
32
+ "dependencies": {
33
+ "eslint-plugin-import": "^2.32.0",
34
+ "eslint-plugin-regexp": "^2.10.0"
35
+ },
36
+ "devDependencies": {
37
+ "@types/eslint-plugin-jsx-a11y": "^6.10.1",
38
+ "@typescript-eslint/eslint-plugin": "^8.46.2",
39
+ "@typescript-eslint/parser": "^8.46.2",
40
+ "eslint": "^9.39.0",
41
+ "eslint-config-prettier": "^10.1.8",
42
+ "eslint-import-resolver-typescript": "^4.4.4",
43
+ "eslint-plugin-import": "^2.32.0",
44
+ "eslint-plugin-jsdoc": "^61.1.11",
45
+ "eslint-plugin-jsx-a11y": "^6.10.2",
46
+ "eslint-plugin-package-json": "^0.59.1",
47
+ "eslint-plugin-prettier": "^5.5.4",
48
+ "eslint-plugin-react": "^7.37.5",
49
+ "eslint-plugin-react-hooks": "^7.0.1",
50
+ "globals": "^16.5.0",
51
+ "jsonc-eslint-parser": "^2.4.1",
52
+ "publint": "^0.3.15",
53
+ "typescript": "^5.9.3",
54
+ "typescript-eslint": "^8.46.2"
55
+ },
56
+ "peerDependencies": {
57
+ "eslint": ">= 9",
58
+ "typescript": ">= 4"
59
+ }
38
60
  }