Skip to content

Commit

Permalink
feat(basic): support lint for package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
leedom92 committed Aug 23, 2023
1 parent 755e530 commit b2483e8
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions packages/eslint-config-basic/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,5 +280,39 @@ module.exports = {
'jsonc/object-property-newline': [2, { allowMultiplePropertiesPerLine: true }],
},
},
{
files: ['package.json'],
parser: 'jsonc-eslint-parser',
rules: {
'jsonc/sort-keys': [
2,
{
'pathPattern': '^$',
'order': [
'name',
'type',
'version',
'private',
'packageManager',
'description',
'keywords',
'author',
'license',
'homepage',
'repository',
'bugs',
'scripts',
'peerDependencies',
'dependencies',
'devDependencies',
],
},
{
'pathPattern': '^(?:dev|peer|optional|bundled)?[Dd]ependencies$',
'order': { 'type': 'asc' },
},
],
},
},
],
}

0 comments on commit b2483e8

Please sign in to comment.