Skip to content
Closed
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
9 changes: 9 additions & 0 deletions .changeset/sweet-tables-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'eslint-plugin-primer-react': minor
---

Add support for ESLint v9

- Adds flat config support
- Adds meta information to config object
- Backwards compatibility with v8
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

39 changes: 0 additions & 39 deletions .eslintrc.js

This file was deleted.

4 changes: 2 additions & 2 deletions .markdownlint-cli2.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ const options = githubMarkdownOpinions.init({
'no-hard-tabs': false,
'first-line-heading': false,
'no-space-in-emphasis': false,
'blanks-around-fences': false
'blanks-around-fences': false,
})

module.exports = {
config: options,
customRules: ['@github/markdownlint-github'],
outputFormatters: [['markdownlint-cli2-formatter-pretty', {appendLink: true}]]
outputFormatters: [['markdownlint-cli2-formatter-pretty', {appendLink: true}]],
}
52 changes: 52 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
const eslintJs = require('@eslint/js')
const github = require('eslint-plugin-github')
const globals = require('globals')
const pluginJest = require('eslint-plugin-jest')

module.exports = [
github.getFlatConfigs().recommended,
eslintJs.configs.recommended,
{
languageOptions: {
parserOptions: {
ecmaVersion: 'latest',
},
globals: {
...globals.commonjs,
...globals.node,
},
},
rules: {
'importPlugin/no-commonjs': 'off',
'no-shadow': 'off',
'no-unused-vars': [
'error',
{
varsIgnorePattern: '^_',
},
],
},
ignores: ['**/dist/**', '**/node_modules/**'],
},
{
files: ['**/*.test.js'],
languageOptions: {
globals: {
...pluginJest.environments.globals.globals,
},
},
},
{
files: ['.eslint.config.js', '.markdownlint-cli2.cjs'],
rules: {
'filenames/match-regex': 'off',
'github/filenames-match-regex': 'off',
},
},
{
files: ['src/url.js', 'src/rules/new-color-css-vars.js'],
rules: {
'importPlugin/extensions': 'off',
},
},
]
Loading
Loading