-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): support for v9 configs (#53)
* feat(core): support for v9 configs * ci: add versioned testing * ci: fix install command * ci: fix install * fix: add backward compat parser config * fix: scope context
- Loading branch information
1 parent
f18e602
commit 50aae4b
Showing
6 changed files
with
1,123 additions
and
2,020 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1,17 +1,30 @@ | ||
import StateSnapshot from './StateSnapshot' | ||
import AvoidThisInProxy from './AvoidThisInProxy' | ||
|
||
export const rules = { | ||
'state-snapshot-rule': StateSnapshot, | ||
'avoid-this-in-proxy': AvoidThisInProxy, | ||
const plugin = { | ||
meta: { | ||
name: 'eslint-plugin-valtio', | ||
}, | ||
rules: { | ||
'state-snapshot-rule': StateSnapshot, | ||
'avoid-this-in-proxy': AvoidThisInProxy, | ||
}, | ||
configs: {}, | ||
} | ||
|
||
export const configs = { | ||
recommended: { | ||
plugins: ['valtio'], | ||
rules: { | ||
'valtio/state-snapshot-rule': 'warn', | ||
'valtio/avoid-this-in-proxy': 'warn', | ||
Object.assign(plugin, { | ||
configs: { | ||
recommended: { | ||
plugins: { valtio: plugin }, | ||
rules: { | ||
'valtio/state-snapshot-rule': 'warn', | ||
'valtio/avoid-this-in-proxy': 'warn', | ||
}, | ||
}, | ||
}, | ||
} | ||
}) | ||
|
||
module.exports = plugin | ||
|
||
export const configs = plugin.configs | ||
export const rules = plugin.rules |
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
Oops, something went wrong.