-
Notifications
You must be signed in to change notification settings - Fork 481
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate to ESLint 9 and flat config
Related to bpmn-io/internal-docs#1042
- Loading branch information
1 parent
bb7340f
commit 209303d
Showing
9 changed files
with
487 additions
and
672 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import { merge } from 'min-dash'; | ||
|
||
import globals from 'globals'; | ||
|
||
import bpmnIoPlugin from 'eslint-plugin-bpmn-io'; | ||
import camundaLicensedPlugin from 'eslint-plugin-camunda-licensed'; | ||
|
||
export default [ | ||
...camundaLicensedPlugin.configs.mit.map((config) => { | ||
return { | ||
...config, | ||
files: [ | ||
'app/lib/**/*.js', | ||
'client/src/**/*.js' | ||
] | ||
} | ||
}), | ||
...bpmnIoPlugin.configs.node.map((config) => { | ||
return merge({ | ||
...config, | ||
files: [ | ||
'app/lib/**/*.js', | ||
'resources/**/*.js', | ||
'tasks/**/*.js' | ||
] | ||
}, { | ||
languageOptions: { | ||
globals: { | ||
...globals.chai, | ||
...globals.mocha | ||
} | ||
} | ||
}) | ||
}), | ||
...bpmnIoPlugin.configs.mocha.map((config) => { | ||
return { | ||
...config, | ||
files: [ | ||
'**/__tests__/**/*.js', | ||
'test/**/*.js' | ||
] | ||
}; | ||
}), | ||
...bpmnIoPlugin.configs.browser.map((config) => { | ||
return merge({ | ||
...config, | ||
files: [ | ||
'client/src/**/*.js', | ||
'resources/plugins/**/*.js' | ||
] | ||
}, { | ||
languageOptions: { | ||
globals: { | ||
...globals.chai, | ||
...globals.mocha, | ||
...globals.node | ||
} | ||
} | ||
}); | ||
}), | ||
...bpmnIoPlugin.configs.jsx.map((config) => { | ||
return merge({ | ||
...config, | ||
files: [ | ||
'client/src/**/*.js', | ||
'resources/plugins/**/*.js' | ||
] | ||
}, { | ||
rules: { | ||
'react/jsx-uses-react': 'error', | ||
'react/react-in-jsx-scope': 'error' | ||
} | ||
}); | ||
}), | ||
{ | ||
ignores: [ | ||
'**/dist', | ||
'**/node_modules', | ||
'app/public', | ||
'app/preload', | ||
'client/build', | ||
'coverage', | ||
'docs', | ||
'tmp' | ||
] | ||
} | ||
]; |
Oops, something went wrong.