Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions packages/@d-zero/eslint-config/base.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import dzeroPlugin from '@d-zero/eslint-plugin';
import { fixupPluginRules } from '@eslint/compat';
import js from '@eslint/js';
import comments from 'eslint-plugin-eslint-comments';
import comments from '@eslint-community/eslint-plugin-eslint-comments';
import { flatConfigs as importX } from 'eslint-plugin-import-x';
import jsdoc from 'eslint-plugin-jsdoc';
import * as regexpPlugin from 'eslint-plugin-regexp';
Expand Down Expand Up @@ -73,6 +74,10 @@ export const base = [
regexpPlugin.configs['flat/recommended'],
{
...importX.recommended,
plugins: {
...importX.recommended.plugins,
'import-x': fixupPluginRules(importX.recommended.plugins['import-x']),
},
rules: {
...importX.recommended.rules,
'import-x/no-extraneous-dependencies': 2,
Expand Down Expand Up @@ -109,6 +114,10 @@ export const base = [
},
{
...jsdoc.configs['flat/recommended'],
plugins: {
...jsdoc.configs['flat/recommended'].plugins,
jsdoc: fixupPluginRules(jsdoc.configs['flat/recommended'].plugins.jsdoc),
},
rules: {
...jsdoc.configs['flat/recommended'].rules,
'jsdoc/require-param-type': 0,
Expand All @@ -120,13 +129,13 @@ export const base = [
},
{
plugins: {
comments,
comments: fixupPluginRules(comments),
},
},
{
plugins: {
comments,
'sort-class-members': sortClassMembers,
comments: fixupPluginRules(comments),
'sort-class-members': fixupPluginRules(sortClassMembers),
},
rules: {
'sort-class-members/sort-class-members': [
Expand Down
7 changes: 4 additions & 3 deletions packages/@d-zero/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
},
"dependencies": {
"@d-zero/eslint-plugin": "5.0.0",
"@eslint/js": "9.39.3",
"eslint": "9.39.3",
"eslint-plugin-eslint-comments": "3.2.0",
"@eslint-community/eslint-plugin-eslint-comments": "4.6.0",
"@eslint/compat": "2.0.2",
"@eslint/js": "10.0.1",
"eslint": "10.0.0",
"eslint-plugin-import-x": "4.16.1",
"eslint-plugin-jsdoc": "62.7.1",
"eslint-plugin-regexp": "3.0.0",
Expand Down
1 change: 0 additions & 1 deletion packages/@d-zero/eslint-config/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const ts = tsESLint.config(
'@typescript-eslint/no-namespace': [2, { allowDeclarations: true }],
'@typescript-eslint/no-unnecessary-type-assertion': 2,
'@typescript-eslint/no-unused-vars': 2,
'@typescript-eslint/no-var-requires': 2,
'@typescript-eslint/prefer-namespace-keyword': 2,
'@typescript-eslint/require-await': 2,
'@typescript-eslint/restrict-plus-operands': 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,18 @@ function canBeReplacedWithIndividualProperties(value: string): {
// Generate suggestion based on function type
const args = postcssValueParser.stringify(node.nodes);
suggestions.push(`${property}: ${args}`);

// Don't walk into the arguments of transform functions
return false;
break;
}
}

if (!isReplaceable) {
hasNonReplaceableFunction = true;
}

// Don't walk into the arguments of transform functions
if (isReplaceable) {
return false;
}
}
return true;
});
Expand Down
Loading