11'use strict'
22
3+ const eslintPluginImportX = require ( 'eslint-plugin-import-x' )
34const eslintPluginJs = require ( '@eslint/js' )
45const eslintPluginN = require ( 'eslint-plugin-n' )
56const eslintPluginStylistic = require ( '@stylistic/eslint-plugin' )
@@ -8,18 +9,28 @@ const globals = require('globals')
89
910module . exports = [
1011 eslintPluginJs . configs . recommended ,
12+ eslintPluginImportX . flatConfigs . recommended ,
1113 eslintPluginN . configs [ 'flat/recommended-script' ] ,
1214 eslintPluginStylistic . configs . recommended ,
1315 eslintPluginUnicorn . configs . recommended ,
1416 {
1517 languageOptions : {
18+ ecmaVersion : 2022 ,
19+ sourceType : 'commonjs' ,
1620 globals : {
21+ ...globals . es2022 ,
1722 ...globals . node ,
1823 } ,
1924 } ,
2025 rules : {
2126 '@stylistic/brace-style' : [ 'error' , '1tbs' ] ,
2227 '@stylistic/space-before-function-paren' : [ 'error' , 'always' ] ,
28+ 'import-x/extensions' : [ 'error' , 'never' , { json : 'always' } ] ,
29+ 'import-x/no-absolute-path' : 'error' ,
30+ 'import-x/no-webpack-loader-syntax' : 'error' ,
31+ 'import-x/order' : [ 'error' , {
32+ 'newlines-between' : 'always' ,
33+ } ] ,
2334 'n/no-process-exit' : 'off' , // Duplicate of unicorn/no-process-exit
2435 'unicorn/prefer-module' : 'off' , // We use CJS
2536 'unicorn/prevent-abbreviations' : 'off' ,
0 commit comments