Skip to content

Commit ac045f0

Browse files
committed
upgrade eslint to 9.x
1 parent a8884bf commit ac045f0

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

lambdas/eslint.config.js

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// @ts-check
2+
3+
// Import required modules using CommonJS require syntax
4+
const { FlatCompat } = require('@eslint/eslintrc');
5+
const js = require('@eslint/js');
6+
const path = require('path');
7+
8+
// Setup FlatCompat for backward compatibility with .eslintrc.* format
9+
const compat = new FlatCompat({
10+
baseDirectory: __dirname,
11+
recommendedConfig: js.configs.recommended,
12+
});
13+
14+
// Create the ESLint 9.x flat config
15+
module.exports = [
16+
js.configs.recommended,
17+
...compat.extends(
18+
'plugin:@typescript-eslint/recommended'
19+
),
20+
{
21+
// Global linting settings
22+
languageOptions: {
23+
parser: require('@typescript-eslint/parser'),
24+
parserOptions: {
25+
ecmaVersion: 2022,
26+
sourceType: 'module',
27+
},
28+
},
29+
plugins: {
30+
'@typescript-eslint': require('@typescript-eslint/eslint-plugin'),
31+
'prettier': require('eslint-plugin-prettier'),
32+
},
33+
rules: {
34+
'prettier/prettier': 'error',
35+
},
36+
},
37+
{
38+
// Files to ignore
39+
ignores: ['**/node_modules/**', '**/dist/**', '**/.nx/**', '**/coverage/**'],
40+
},
41+
];
42+

0 commit comments

Comments
 (0)