@dcl/eslint-config 2.2.1-9701255136.commit-fcb4128 → 2.2.2-9962897455.commit-00cd6d2

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 (2) hide show
  1. package/dapps.js +141 -56
  2. package/package.json +2 -2
package/dapps.js CHANGED
@@ -4,89 +4,174 @@ module.exports = {
4
4
  browser: true,
5
5
  es6: true,
6
6
  },
7
- parser: '@typescript-eslint/parser',
8
- plugins: ['@typescript-eslint', 'import'],
7
+ parser: "@typescript-eslint/parser",
8
+ parserOptions: {
9
+ ecmaVersion: 2018,
10
+ sourceType: "module",
11
+ },
12
+ plugins: ["@typescript-eslint", "import", "autofix"],
9
13
  extends: [
10
- 'eslint:recommended',
11
- 'plugin:import/recommended',
12
- 'plugin:import/typescript',
13
- 'plugin:@typescript-eslint/recommended',
14
- 'plugin:prettier/recommended',
14
+ "eslint:recommended",
15
+ "plugin:import/recommended",
16
+ "plugin:import/typescript",
17
+ "plugin:@typescript-eslint/recommended",
18
+ "plugin:prettier/recommended",
15
19
  ],
16
20
  rules: {
17
- '@typescript-eslint/ban-types': 'error',
18
- '@typescript-eslint/ban-tslint-comment': 'error',
19
- '@typescript-eslint/quotes': ['error', 'single', { avoidEscape: true }],
20
- '@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: false }],
21
- '@typescript-eslint/no-unnecessary-type-assertion': 'error',
22
- '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', ignoreRestSiblings: true }],
23
- '@typescript-eslint/unbound-method': 'error',
24
- '@typescript-eslint/naming-convention': [
25
- 'error',
26
- { selector: 'default', format: ['camelCase'] },
27
- { selector: 'variableLike', format: ['camelCase'] },
28
- { selector: 'variable', format: ['camelCase', 'UPPER_CASE'], leadingUnderscore: 'allow' },
29
- { selector: 'variable', types: ['function'], format: ['PascalCase', 'camelCase'] },
30
- { selector: 'parameter', format: ['camelCase'], leadingUnderscore: 'allow' },
31
- { selector: 'memberLike', format: ['camelCase'] },
32
- { selector: 'memberLike', modifiers: ['private'], format: ['camelCase'], leadingUnderscore: 'allow' },
33
- { selector: 'typeLike', format: ['PascalCase'] },
34
- { selector: 'typeParameter', format: ['PascalCase'], prefix: ['T'] },
35
- { selector: 'interface', format: ['PascalCase'], custom: { regex: '^I[A-Z]', match: false } },
21
+ "react/display-name": "off",
22
+ "import/no-named-as-default-member": "off",
23
+ "import/no-default-export": "error",
24
+ "import/group-exports": "error",
25
+ "import/exports-last": "error",
26
+ "@typescript-eslint/no-explicit-any": "error",
27
+ "@typescript-eslint/ban-types": "error",
28
+ "@typescript-eslint/ban-tslint-comment": "error",
29
+ "@typescript-eslint/quotes": ["error", "single", { avoidEscape: true }],
30
+ "@typescript-eslint/no-misused-promises": [
31
+ "error",
32
+ { checksVoidReturn: false },
33
+ ],
34
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
35
+ "@typescript-eslint/no-unused-vars": [
36
+ "error",
37
+ { argsIgnorePattern: "^_", ignoreRestSiblings: true },
38
+ ],
39
+ "@typescript-eslint/unbound-method": "error",
40
+ "@typescript-eslint/naming-convention": [
41
+ "error",
42
+ { selector: "default", format: ["camelCase"] },
43
+ { selector: "variableLike", format: ["camelCase"] },
44
+ {
45
+ selector: "variable",
46
+ format: ["camelCase", "UPPER_CASE"],
47
+ leadingUnderscore: "allow",
48
+ },
49
+ {
50
+ selector: "variable",
51
+ types: ["function"],
52
+ format: ["PascalCase", "camelCase"],
53
+ },
54
+ {
55
+ selector: "parameter",
56
+ format: ["camelCase"],
57
+ leadingUnderscore: "allow",
58
+ },
59
+ { selector: "memberLike", format: ["camelCase"] },
36
60
  {
37
- selector: ['variable', 'function', 'objectLiteralProperty', 'objectLiteralMethod'],
38
- types: ['function'],
39
- format: ['StrictPascalCase', 'strictCamelCase'],
61
+ selector: "memberLike",
62
+ modifiers: ["private"],
63
+ format: ["camelCase"],
64
+ leadingUnderscore: "allow",
65
+ },
66
+ { selector: "typeLike", format: ["PascalCase"] },
67
+ { selector: "typeParameter", format: ["PascalCase"], prefix: ["T"] },
68
+ {
69
+ selector: "interface",
70
+ format: ["PascalCase"],
71
+ custom: { regex: "^I[A-Z]", match: false },
72
+ },
73
+ {
74
+ selector: [
75
+ "variable",
76
+ "function",
77
+ "objectLiteralProperty",
78
+ "objectLiteralMethod",
79
+ ],
80
+ types: ["function"],
81
+ format: ["StrictPascalCase", "strictCamelCase"],
82
+ },
83
+ {
84
+ selector: ["enum"],
85
+ format: ["UPPER_CASE", "PascalCase"],
86
+ leadingUnderscore: "allow",
87
+ },
88
+ {
89
+ selector: ["enumMember"],
90
+ format: ["UPPER_CASE"],
91
+ leadingUnderscore: "allow",
40
92
  },
41
- { selector: ['enum'], format: ['UPPER_CASE', 'PascalCase'], leadingUnderscore: 'allow' },
42
- { selector: ['enumMember'], format: ['UPPER_CASE'], leadingUnderscore: 'allow' },
43
93
  ],
44
- 'import/order': [
45
- 'error',
94
+ "autofix/no-debugger": "error",
95
+ "sort-imports": [
96
+ "error",
46
97
  {
47
- groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
48
- pathGroupsExcludedImportTypes: ['react', 'react-*/**', 'react-*', '@dcl/**', 'decentraland-*/**', 'decentraland-*'],
98
+ ignoreDeclarationSort: true, // don't want to sort import lines, use eslint-plugin-import instead
99
+ memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
100
+ allowSeparatedGroups: true,
101
+ },
102
+ ],
103
+ "import/order": [
104
+ "error",
105
+ {
106
+ groups: [
107
+ "builtin",
108
+ "external",
109
+ "internal",
110
+ "parent",
111
+ "sibling",
112
+ "index",
113
+ "object",
114
+ ],
115
+ pathGroupsExcludedImportTypes: [
116
+ "react",
117
+ "react-*/**",
118
+ "react-*",
119
+ "@dcl/**",
120
+ "decentraland-*/**",
121
+ "decentraland-*",
122
+ "@mui/*",
123
+ "@dcl/schemas/*",
124
+ "@emotion/*",
125
+ ],
49
126
  pathGroups: [
50
- { pattern: 'react', group: 'builtin', position: 'before' },
51
- { pattern: 'react-*/**', group: 'builtin' },
52
- { pattern: 'react-*', group: 'builtin' },
53
- { pattern: '@dcl/**', group: 'external', position: 'after' },
54
- { pattern: 'decentraland-*/**', group: 'external', position: 'after' },
55
- { pattern: 'decentraland-*', group: 'external', position: 'after' },
56
- { pattern: 'lib/**', group: 'internal', position: 'before' },
57
- { pattern: 'modules/**', group: 'internal', position: 'before' },
58
- { pattern: 'components/**', group: 'internal', position: 'after' },
59
- { pattern: './*.types', group: 'sibling', position: 'after' },
60
- { pattern: './*.css', group: 'sibling', position: 'after' },
127
+ { pattern: "react", group: "builtin", position: "before" },
128
+ { pattern: "react-*/**", group: "builtin" },
129
+ { pattern: "react-*", group: "builtin" },
130
+ { pattern: "@dcl/**", group: "external", position: "after" },
131
+ {
132
+ pattern: "decentraland-*/**",
133
+ group: "external",
134
+ position: "after",
135
+ },
136
+ { pattern: "decentraland-*", group: "external", position: "after" },
137
+ { pattern: "@mui/*", group: "internal" },
138
+ { pattern: "@emotion/*", group: "internal" },
139
+ { pattern: "@dcl/schemas/*", group: "internal" },
140
+ { pattern: "lib/**", group: "internal", position: "before" },
141
+ { pattern: "modules/**", group: "internal", position: "before" },
142
+ { pattern: "components/**", group: "internal", position: "after" },
143
+ { pattern: "./*.types", group: "sibling", position: "after" },
144
+ { pattern: "./*.styled", group: "sibling", position: "after" },
145
+ { pattern: "./*.css", group: "sibling", position: "after" },
61
146
  ],
62
147
  distinctGroup: false,
63
- 'newlines-between': 'never',
148
+ "newlines-between": "never",
64
149
  alphabetize: {
65
- order: 'asc',
150
+ order: "asc",
66
151
  caseInsensitive: true,
67
- orderImportKind: 'desc',
152
+ orderImportKind: "desc",
68
153
  },
69
154
  warnOnUnassignedImports: true,
70
155
  },
71
156
  ],
72
- 'prettier/prettier': [
73
- 'error',
157
+ "prettier/prettier": [
158
+ "error",
74
159
  {
75
160
  semi: false,
76
161
  singleQuote: true,
77
162
  printWidth: 140,
78
163
  tabWidth: 2,
79
- trailingComma: 'none',
80
- arrowParens: 'avoid',
164
+ trailingComma: "none",
165
+ arrowParens: "avoid",
81
166
  },
82
167
  ],
83
168
  },
84
169
  settings: {
85
- 'import/resolver': {
170
+ "import/resolver": {
86
171
  typescript: true,
87
172
  node: {
88
- paths: ['./src'],
173
+ paths: ["./src"],
89
174
  },
90
175
  },
91
176
  },
92
- }
177
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/eslint-config",
3
- "version": "2.2.1-9701255136.commit-fcb4128",
3
+ "version": "2.2.2-9962897455.commit-00cd6d2",
4
4
  "description": "Decentraland ESLint config",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -53,5 +53,5 @@
53
53
  "dapps.js",
54
54
  "ui.js"
55
55
  ],
56
- "commit": "fcb41289449d934e5412144a7c7d42907807037c"
56
+ "commit": "00cd6d22d6c7997cb969aedd8905bec9e9e47d4b"
57
57
  }