-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat!: migrate to eslint 9 BREAKING CHANGE: use eslint 9 and assume typescript projects * ci: skip ts dep check * chore: pass linter * chore(release): 5.2.3-dev.0 [skip ci] * fix: update import-style rule * chore(release): 5.2.3-dev.1 [skip ci] * fix: linting * chore: update README * chore: bump minimum node version * chore: code review * chore(release): 5.2.3-dev.2 [skip ci] * chore: add stylistic * chore: add stylistic * chore(release): 5.2.3-dev.3 [skip ci] --------- Co-authored-by: svc-cli-bot <[email protected]>
- Loading branch information
1 parent
eb27b1c
commit b683efd
Showing
8 changed files
with
1,907 additions
and
327 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"@oclif/prettier-config" |
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,33 +1,139 @@ | ||
module.exports = { | ||
extends: [ | ||
'eslint:recommended', | ||
'xo-space', | ||
'plugin:n/recommended', | ||
'plugin:unicorn/recommended', | ||
], | ||
plugins: [ | ||
'n', | ||
'mocha', | ||
'unicorn', | ||
], | ||
rules: { | ||
'capitalized-comments': 0, | ||
'comma-dangle': ['error', 'always-multiline'], | ||
'default-case': 0, | ||
'no-multi-spaces': 0, | ||
'n/shebang': 0, | ||
curly: 0, | ||
indent: ['error', 2, {SwitchCase: 0, MemberExpression: 0}], | ||
quotes: ['error', 'single', {avoidEscape: true}], | ||
semi: ['error', 'never'], | ||
'unicorn/prevent-abbreviations': 'off', | ||
'unicorn/no-await-expression-member': 'off', | ||
'unicorn/no-null': 'off', | ||
'unicorn/prefer-module': 'warn', | ||
'logical-assignment-operators': 'off', | ||
import eslint from '@eslint/js' | ||
import xo from 'eslint-config-xo/space' | ||
import importPlugin from 'eslint-plugin-import' | ||
import jsdoc from 'eslint-plugin-jsdoc' | ||
import mocha from 'eslint-plugin-mocha' | ||
import nodePlugin from 'eslint-plugin-n' | ||
import perfectionist from 'eslint-plugin-perfectionist' | ||
import eslintPluginUnicorn from 'eslint-plugin-unicorn' | ||
import tseslint, {configs} from 'typescript-eslint' | ||
|
||
export default tseslint.config( | ||
eslint.configs.recommended, | ||
configs.recommended, | ||
...xo, | ||
mocha.configs.flat.recommended, | ||
nodePlugin.configs['flat/recommended'], | ||
eslintPluginUnicorn.configs['flat/recommended'], | ||
importPlugin.flatConfigs.recommended, | ||
importPlugin.flatConfigs.typescript, | ||
perfectionist.configs['recommended-natural'], | ||
jsdoc.configs['flat/recommended'], | ||
{ | ||
files: ['test/**/*.test.ts'], | ||
rules: { | ||
'@typescript-eslint/no-unused-expressions': 'off', | ||
}, | ||
}, | ||
globals: { | ||
describe: true, | ||
it: true, | ||
{ | ||
languageOptions: { | ||
globals: { | ||
describe: true, | ||
it: true, | ||
NodeJS: true, | ||
}, | ||
}, | ||
plugins: { | ||
mocha, | ||
n: nodePlugin, | ||
}, | ||
rules: { | ||
'@stylistic/comma-dangle': ['error', 'always-multiline'], | ||
'@stylistic/indent': [ | ||
'error', | ||
2, | ||
{ | ||
MemberExpression: 0, | ||
SwitchCase: 0, | ||
}, | ||
], | ||
'@stylistic/no-multi-spaces': 0, | ||
'@stylistic/quotes': [ | ||
'error', | ||
'single', | ||
{ | ||
avoidEscape: true, | ||
}, | ||
], | ||
'@stylistic/semi': 0, | ||
'@typescript-eslint/no-dupe-class-members': 'error', | ||
'@typescript-eslint/no-redeclare': 'off', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
argsIgnorePattern: '^_', | ||
}, | ||
], | ||
'@typescript-eslint/no-useless-constructor': 'error', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'capitalized-comments': 0, | ||
curly: 0, | ||
'default-case': 0, | ||
'import/no-unresolved': 'error', | ||
'jsdoc/require-jsdoc': 'off', | ||
'jsdoc/require-param': 'off', | ||
'jsdoc/require-param-type': 'off', | ||
'jsdoc/require-returns': 'off', | ||
'jsdoc/require-returns-type': 'off', | ||
'jsdoc/tag-lines': 'off', | ||
'logical-assignment-operators': 'off', | ||
'mocha/no-async-describe': 'off', | ||
'mocha/no-identical-title': 'off', | ||
'mocha/no-mocha-arrows': 'off', | ||
'mocha/no-setup-in-describe': 'off', | ||
'n/hashbang': 0, | ||
'n/no-missing-import': 'off', | ||
'n/no-unsupported-features/es-syntax': 'off', | ||
'no-dupe-class-members': 'off', | ||
'no-redeclare': 'off', | ||
'no-unused-expressions': 'off', | ||
'no-unused-vars': 'off', | ||
'no-useless-constructor': 'off', | ||
'perfectionist/sort-classes': [ | ||
'error', | ||
{ | ||
groups: [ | ||
'index-signature', | ||
'static-property', | ||
'property', | ||
'private-property', | ||
'constructor', | ||
'static-method', | ||
'static-private-method', | ||
['get-method', 'set-method'], | ||
'method', | ||
'private-method', | ||
'unknown', | ||
], | ||
order: 'asc', | ||
type: 'alphabetical', | ||
}, | ||
], | ||
'perfectionist/sort-modules': 'off', | ||
'unicorn/import-style': [ | ||
'error', | ||
{ | ||
styles: { | ||
'node:path': { | ||
named: true, | ||
}, | ||
}, | ||
}, | ||
], | ||
'unicorn/no-await-expression-member': 'off', | ||
'unicorn/no-null': 'off', | ||
'unicorn/prefer-module': 'warn', | ||
'unicorn/prevent-abbreviations': 'off', | ||
}, | ||
settings: { | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.ts', '.tsx'], | ||
}, | ||
'import/resolver': { | ||
typescript: { | ||
alwaysTryTypes: true, | ||
}, | ||
}, | ||
}, | ||
}, | ||
} | ||
) |
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,33 +1,52 @@ | ||
{ | ||
"name": "eslint-config-oclif", | ||
"description": "eslint config for oclif", | ||
"version": "5.2.2", | ||
"version": "5.2.3-dev.3", | ||
"author": "Salesforce", | ||
"bugs": "https://github.com/oclif/eslint-config-oclif/issues", | ||
"dependencies": { | ||
"@eslint/compat": "^1.2.5", | ||
"@eslint/eslintrc": "^3.2.0", | ||
"@eslint/js": "^9.18.0", | ||
"@stylistic/eslint-plugin": "^3.0.0", | ||
"@typescript-eslint/eslint-plugin": "^8", | ||
"@typescript-eslint/parser": "^8", | ||
"eslint-config-oclif": "^5.2.2", | ||
"eslint-config-xo": "^0.46.0", | ||
"eslint-config-xo-space": "^0.35.0", | ||
"eslint-import-resolver-typescript": "^3.7.0", | ||
"eslint-plugin-import": "^2.31.0", | ||
"eslint-plugin-jsdoc": "^50.6.1", | ||
"eslint-plugin-mocha": "^10.5.0", | ||
"eslint-plugin-n": "^15.1.0", | ||
"eslint-plugin-unicorn": "^48.0.1" | ||
"eslint-plugin-n": "^17.15.1", | ||
"eslint-plugin-perfectionist": "^4", | ||
"eslint-plugin-unicorn": "^56.0.1", | ||
"typescript-eslint": "^8.20.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^8.57.1" | ||
"@oclif/prettier-config": "^0.2.1", | ||
"eslint": "^9", | ||
"typescript": "^5" | ||
}, | ||
"engines": { | ||
"node": ">=18.0.0" | ||
"node": ">=18.18.0" | ||
}, | ||
"files": [ | ||
"/index.js" | ||
], | ||
"homepage": "https://github.com/oclif/eslint-config-oclif", | ||
"keywords": [ | ||
"oclif" | ||
"oclif", | ||
"eslint", | ||
"eslint-config", | ||
"eslint config" | ||
], | ||
"license": "MIT", | ||
"main": "index.js", | ||
"repository": "oclif/eslint-config-oclif", | ||
"scripts": { | ||
"test": "eslint -c index.js .", | ||
"build": "echo 'nothing to build!'" | ||
} | ||
}, | ||
"type": "module" | ||
} |
Oops, something went wrong.