generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
What would you like?
The @aws/durable-execution-sdk-js-eslint-plugin only supports legacy ESLint config format. The configs.recommended preset uses a string-based plugins array, which is incompatible with ESLint flat config (eslint.config.mjs).
Flat config has been the default since ESLint v9 and legacy .eslintrc is deprecated. Projects using flat config must manually wire up the plugin:
import durableFunctions from '@aws/durable-execution-sdk-js-eslint-plugin';
export default [
{
plugins: { '@aws/durable-functions': durableFunctions },
rules: {
'@aws/durable-functions/no-nested-durable-operations': 'error',
'@aws/durable-functions/no-non-deterministic-outside-step': 'error',
'@aws/durable-functions/no-closure-in-durable-operations': 'error',
},
},
];A flat config-compatible preset would let users simply spread it instead:
import durableFunctions from '@aws/durable-execution-sdk-js-eslint-plugin';
export default [durableFunctions.configs.recommended];Possible Implementation
Export a flat config-compatible configs.recommended that uses the object-based plugins format:
const recommended = {
plugins: {
'@aws/durable-functions': plugin, // plugin object, not a string
},
rules: {
'@aws/durable-functions/no-nested-durable-operations': 'error',
'@aws/durable-functions/no-non-deterministic-outside-step': 'error',
'@aws/durable-functions/no-closure-in-durable-operations': 'error',
},
};For reference, typescript-eslint is a good example of a plugin exporting flat config-compatible presets.
Is this a breaking change?
No
Does this require an RFC?
No
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels