|
9 | 9 | - internal-rules
|
10 | 10 | - node
|
11 | 11 | - import
|
| 12 | + - simple-import-sort |
12 | 13 | settings:
|
13 | 14 | node:
|
14 | 15 | tryExtensions: ['.js', '.json', '.node', '.ts', '.d.ts']
|
@@ -140,6 +141,38 @@ rules:
|
140 | 141 | import/group-exports: off
|
141 | 142 | import/dynamic-import-chunkname: off
|
142 | 143 |
|
| 144 | + ############################################################################## |
| 145 | + # `eslint-plugin-simple-import-sort` rule list based on `v2.25.x` |
| 146 | + # https://github.com/lydell/eslint-plugin-simple-import-sort |
| 147 | + ############################################################################## |
| 148 | + simple-import-sort/imports: |
| 149 | + - error |
| 150 | + - groups: |
| 151 | + # Packages. |
| 152 | + # Things that start with a letter (or digit or underscore), or `@` followed by a letter. |
| 153 | + - ["^@?\\w"] |
| 154 | + |
| 155 | + # General utilities |
| 156 | + - ["^(\\./|(\\.\\./)+)__testUtils__/"] |
| 157 | + - ["^(\\./|(\\.\\./)+)jsutils/"] |
| 158 | + |
| 159 | + # Top-level directories |
| 160 | + - ["^(\\./|(\\.\\./)+)error/"] |
| 161 | + - ["^(\\./|(\\.\\./)+)language/"] |
| 162 | + - ["^(\\./|(\\.\\./)+)type/"] |
| 163 | + - ["^(\\./|(\\.\\./)+)validation/"] |
| 164 | + - ["^(\\./|(\\.\\./)+)execution/"] |
| 165 | + - ["^(\\./|(\\.\\./)+)utilities/"] |
| 166 | + |
| 167 | + # Relative imports. |
| 168 | + # Anything that starts with a dot. |
| 169 | + - ["^(\\.\\./){4,}"] |
| 170 | + - ["^(\\.\\./){3}"] |
| 171 | + - ["^(\\.\\./){2}"] |
| 172 | + - ["^(\\.\\./){1}"] |
| 173 | + - ["^\\./"] |
| 174 | + simple-import-sort/exports: off # TODO |
| 175 | + |
143 | 176 | ##############################################################################
|
144 | 177 | # ESLint builtin rules list based on `v8.5.x`
|
145 | 178 | ##############################################################################
|
|
0 commit comments