@@ -3,8 +3,8 @@ module.exports = {
33 env : {
44 node : true ,
55 } ,
6- extends : [ 'prettier' , 'eslint:recommended' ] ,
7- plugins : [ 'sentry-sdk' , 'jsdoc' , 'deprecation '] ,
6+ extends : [ 'prettier' , 'eslint:recommended' , 'plugin:import/errors' , 'plugin:import/warnings' ] ,
7+ plugins : [ 'sentry-sdk' , 'simple-import-sort ' ] ,
88 ignorePatterns : [ 'eslint-plugin-sentry-sdk' ] ,
99 overrides : [
1010 {
@@ -17,8 +17,8 @@ module.exports = {
1717 {
1818 // Configuration for typescript files
1919 files : [ '*.ts' , '*.tsx' , '*.d.ts' ] ,
20- extends : [ 'plugin:@typescript-eslint/recommended' , 'prettier/@typescript-eslint' ] ,
21- plugins : [ '@typescript-eslint' ] ,
20+ extends : [ 'plugin:@typescript-eslint/recommended' , 'prettier/@typescript-eslint' , 'plugin:import/typescript' ] ,
21+ plugins : [ '@typescript-eslint' , 'jsdoc' , 'deprecation' ] ,
2222 parser : '@typescript-eslint/parser' ,
2323 parserOptions : {
2424 project : './tsconfig.json' ,
@@ -82,6 +82,11 @@ module.exports = {
8282
8383 // Do not use deprecated methods
8484 'deprecation/deprecation' : 'error' ,
85+
86+ // sort imports
87+ 'simple-import-sort/sort' : 'error' ,
88+ 'sort-imports' : 'off' ,
89+ 'import/order' : 'off' ,
8590 } ,
8691 } ,
8792 {
@@ -153,5 +158,11 @@ module.exports = {
153158
154159 // Make sure all expressions are used. Turn off on tests.
155160 'no-unused-expressions' : 'error' ,
161+
162+ // We shouldn't make assumptions about imports/exports being dereferenced.
163+ 'import/namespace' : 'off' ,
164+
165+ // imports should be ordered.
166+ 'import/order' : [ 'error' , { 'newlines-between' : 'always' } ] ,
156167 } ,
157168} ;
0 commit comments