mirror of
https://github.com/actions/attest-build-provenance.git
synced 2025-12-16 12:19:04 +00:00
bump eslint from 8.57.1 to 9.16.0 (#418)
Signed-off-by: Brian DeHamer <bdehamer@github.com>
This commit is contained in:
parent
7668571508
commit
f4b7552a12
@ -1,4 +0,0 @@
|
|||||||
lib/
|
|
||||||
dist/
|
|
||||||
node_modules/
|
|
||||||
coverage/
|
|
||||||
83
.github/linters/.eslintrc.yml
vendored
83
.github/linters/.eslintrc.yml
vendored
@ -1,83 +0,0 @@
|
|||||||
env:
|
|
||||||
node: true
|
|
||||||
es6: true
|
|
||||||
jest: true
|
|
||||||
|
|
||||||
globals:
|
|
||||||
Atomics: readonly
|
|
||||||
SharedArrayBuffer: readonly
|
|
||||||
|
|
||||||
ignorePatterns:
|
|
||||||
- '!.*'
|
|
||||||
- '**/node_modules/.*'
|
|
||||||
- '**/dist/.*'
|
|
||||||
- '**/coverage/.*'
|
|
||||||
- '*.json'
|
|
||||||
|
|
||||||
parser: '@typescript-eslint/parser'
|
|
||||||
|
|
||||||
parserOptions:
|
|
||||||
ecmaVersion: 2023
|
|
||||||
sourceType: module
|
|
||||||
project:
|
|
||||||
- './.github/linters/tsconfig.json'
|
|
||||||
- './tsconfig.json'
|
|
||||||
|
|
||||||
plugins:
|
|
||||||
- jest
|
|
||||||
- '@typescript-eslint'
|
|
||||||
|
|
||||||
extends:
|
|
||||||
- eslint:recommended
|
|
||||||
- plugin:@typescript-eslint/eslint-recommended
|
|
||||||
- plugin:@typescript-eslint/recommended
|
|
||||||
- plugin:github/recommended
|
|
||||||
- plugin:jest/recommended
|
|
||||||
|
|
||||||
rules:
|
|
||||||
{
|
|
||||||
'camelcase': 'off',
|
|
||||||
'eslint-comments/no-use': 'off',
|
|
||||||
'eslint-comments/no-unused-disable': 'off',
|
|
||||||
'i18n-text/no-en': 'off',
|
|
||||||
'import/no-namespace': 'off',
|
|
||||||
'no-console': 'off',
|
|
||||||
'no-unused-vars': 'off',
|
|
||||||
'prettier/prettier': 'error',
|
|
||||||
'semi': 'off',
|
|
||||||
'@typescript-eslint/array-type': 'error',
|
|
||||||
'@typescript-eslint/await-thenable': 'error',
|
|
||||||
'@typescript-eslint/ban-ts-comment': 'error',
|
|
||||||
'@typescript-eslint/consistent-type-assertions': 'error',
|
|
||||||
'@typescript-eslint/explicit-member-accessibility':
|
|
||||||
['error', { 'accessibility': 'no-public' }],
|
|
||||||
'@typescript-eslint/explicit-function-return-type':
|
|
||||||
['error', { 'allowExpressions': true }],
|
|
||||||
'@typescript-eslint/func-call-spacing': ['error', 'never'],
|
|
||||||
'@typescript-eslint/no-array-constructor': 'error',
|
|
||||||
'@typescript-eslint/no-empty-interface': 'error',
|
|
||||||
'@typescript-eslint/no-explicit-any': 'error',
|
|
||||||
'@typescript-eslint/no-extraneous-class': 'error',
|
|
||||||
'@typescript-eslint/no-for-in-array': 'error',
|
|
||||||
'@typescript-eslint/no-inferrable-types': 'error',
|
|
||||||
'@typescript-eslint/no-misused-new': 'error',
|
|
||||||
'@typescript-eslint/no-namespace': 'error',
|
|
||||||
'@typescript-eslint/no-non-null-assertion': 'warn',
|
|
||||||
'@typescript-eslint/no-require-imports': 'error',
|
|
||||||
'@typescript-eslint/no-unnecessary-qualifier': 'error',
|
|
||||||
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
|
|
||||||
'@typescript-eslint/no-unused-vars': 'error',
|
|
||||||
'@typescript-eslint/no-useless-constructor': 'error',
|
|
||||||
'@typescript-eslint/no-var-requires': 'error',
|
|
||||||
'@typescript-eslint/prefer-for-of': 'warn',
|
|
||||||
'@typescript-eslint/prefer-function-type': 'warn',
|
|
||||||
'@typescript-eslint/prefer-includes': 'error',
|
|
||||||
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
|
|
||||||
'@typescript-eslint/promise-function-async': 'error',
|
|
||||||
'@typescript-eslint/require-array-sort-compare': 'error',
|
|
||||||
'@typescript-eslint/restrict-plus-operands': 'error',
|
|
||||||
'@typescript-eslint/semi': ['error', 'never'],
|
|
||||||
'@typescript-eslint/space-before-function-paren': 'off',
|
|
||||||
'@typescript-eslint/type-annotation-spacing': 'error',
|
|
||||||
'@typescript-eslint/unbound-method': 'error'
|
|
||||||
}
|
|
||||||
92
.github/linters/eslint.config.mjs
vendored
Normal file
92
.github/linters/eslint.config.mjs
vendored
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
import eslint from '@eslint/js'
|
||||||
|
import importplugin from 'eslint-plugin-import'
|
||||||
|
import jestplugin from 'eslint-plugin-jest'
|
||||||
|
import tseslint from 'typescript-eslint'
|
||||||
|
|
||||||
|
export default tseslint.config(
|
||||||
|
// Ignore non-project files
|
||||||
|
{
|
||||||
|
name: 'ignore',
|
||||||
|
ignores: ['.github', 'dist', 'coverage', '**/*.json', 'jest.setup.js']
|
||||||
|
},
|
||||||
|
// Use recommended rules from ESLint, TypeScript, and other plugins
|
||||||
|
eslint.configs.recommended,
|
||||||
|
tseslint.configs.recommendedTypeChecked,
|
||||||
|
jestplugin.configs['flat/recommended'],
|
||||||
|
importplugin.flatConfigs.recommended,
|
||||||
|
importplugin.flatConfigs.typescript,
|
||||||
|
// Override some rules
|
||||||
|
{
|
||||||
|
name: 'project-settings',
|
||||||
|
languageOptions: {
|
||||||
|
ecmaVersion: 2023,
|
||||||
|
parserOptions: {
|
||||||
|
project: ['./.github/linters/tsconfig.json', './tsconfig.json']
|
||||||
|
}
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
// eslint rules
|
||||||
|
eqeqeq: ['error', 'smart'],
|
||||||
|
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
|
||||||
|
'no-console': 'off',
|
||||||
|
'no-implicit-globals': 'error',
|
||||||
|
'no-inner-declarations': 'error',
|
||||||
|
'no-invalid-this': 'error',
|
||||||
|
'no-return-assign': 'error',
|
||||||
|
'no-sequences': 'error',
|
||||||
|
'no-shadow': 'error',
|
||||||
|
'no-useless-concat': 'error',
|
||||||
|
'object-shorthand': ['error', 'always', { avoidQuotes: true }],
|
||||||
|
'one-var': ['error', 'never'],
|
||||||
|
'prefer-template': 'error',
|
||||||
|
|
||||||
|
// typescript-eslint rules
|
||||||
|
'@typescript-eslint/array-type': 'error',
|
||||||
|
'@typescript-eslint/consistent-type-assertions': 'error',
|
||||||
|
'@typescript-eslint/explicit-function-return-type': [
|
||||||
|
'error',
|
||||||
|
{ allowExpressions: true }
|
||||||
|
],
|
||||||
|
'@typescript-eslint/explicit-member-accessibility': [
|
||||||
|
'error',
|
||||||
|
{ accessibility: 'no-public' }
|
||||||
|
],
|
||||||
|
'@typescript-eslint/no-extraneous-class': 'error',
|
||||||
|
'@typescript-eslint/no-inferrable-types': 'error',
|
||||||
|
'@typescript-eslint/no-non-null-assertion': 'warn',
|
||||||
|
'@typescript-eslint/no-unnecessary-qualifier': 'error',
|
||||||
|
'@typescript-eslint/no-unsafe-assignment': 'off',
|
||||||
|
'@typescript-eslint/no-useless-constructor': 'error',
|
||||||
|
'@typescript-eslint/prefer-for-of': 'warn',
|
||||||
|
'@typescript-eslint/prefer-function-type': 'warn',
|
||||||
|
'@typescript-eslint/prefer-includes': 'error',
|
||||||
|
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
|
||||||
|
'@typescript-eslint/promise-function-async': 'error',
|
||||||
|
'@typescript-eslint/require-array-sort-compare': 'error',
|
||||||
|
'@typescript-eslint/restrict-template-expressions': 'off',
|
||||||
|
|
||||||
|
// eslint-plugin-import rules
|
||||||
|
'import/extensions': 'error',
|
||||||
|
'import/first': 'error',
|
||||||
|
'import/no-absolute-path': 'error',
|
||||||
|
'import/no-commonjs': 'error',
|
||||||
|
'import/no-deprecated': 'warn',
|
||||||
|
'import/no-dynamic-require': 'error',
|
||||||
|
'import/no-extraneous-dependencies': 'error',
|
||||||
|
'import/no-mutable-exports': 'error',
|
||||||
|
'import/no-namespace': 'off',
|
||||||
|
'import/no-unresolved': ['error', { ignore: ['csv-parse/sync'] }],
|
||||||
|
'import/no-anonymous-default-export': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
allowAnonymousClass: false,
|
||||||
|
allowAnonymousFunction: false,
|
||||||
|
allowArray: true,
|
||||||
|
allowArrowFunction: false,
|
||||||
|
allowLiteral: true,
|
||||||
|
allowObject: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
@ -8,7 +8,7 @@ import * as main from '../src/main'
|
|||||||
const runMock = jest.spyOn(main, 'run').mockImplementation()
|
const runMock = jest.spyOn(main, 'run').mockImplementation()
|
||||||
|
|
||||||
describe('index', () => {
|
describe('index', () => {
|
||||||
it('calls run when imported', async () => {
|
it('calls run when imported', () => {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require('../src/index')
|
require('../src/index')
|
||||||
|
|
||||||
|
|||||||
3045
package-lock.json
generated
3045
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
15
package.json
15
package.json
@ -28,7 +28,7 @@
|
|||||||
"ci-test": "jest",
|
"ci-test": "jest",
|
||||||
"format:write": "prettier --write **/*.ts",
|
"format:write": "prettier --write **/*.ts",
|
||||||
"format:check": "prettier --check **/*.ts",
|
"format:check": "prettier --check **/*.ts",
|
||||||
"lint:eslint": "npx eslint . -c ./.github/linters/.eslintrc.yml",
|
"lint:eslint": "npx eslint . -c ./.github/linters/eslint.config.mjs",
|
||||||
"lint:markdown": "npx markdownlint --config .github/linters/.markdown-lint.yml \"*.md\"",
|
"lint:markdown": "npx markdownlint --config .github/linters/.markdown-lint.yml \"*.md\"",
|
||||||
"lint": "npm run lint:eslint && npm run lint:markdown",
|
"lint": "npm run lint:eslint && npm run lint:markdown",
|
||||||
"package": "ncc build src/index.ts --license licenses.txt",
|
"package": "ncc build src/index.ts --license licenses.txt",
|
||||||
@ -74,23 +74,20 @@
|
|||||||
"@actions/core": "^1.11.1"
|
"@actions/core": "^1.11.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@eslint/js": "^9.16.0",
|
||||||
"@types/jest": "^29.5.14",
|
"@types/jest": "^29.5.14",
|
||||||
"@types/node": "^22.10.1",
|
"@types/node": "^22.10.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.17.0",
|
|
||||||
"@typescript-eslint/parser": "^7.18.0",
|
|
||||||
"@vercel/ncc": "^0.38.3",
|
"@vercel/ncc": "^0.38.3",
|
||||||
"eslint": "^8.57.1",
|
"eslint": "^9.16.0",
|
||||||
"eslint-plugin-github": "^5.1.4",
|
"eslint-plugin-import": "^2.31.0",
|
||||||
"eslint-plugin-jest": "^28.9.0",
|
"eslint-plugin-jest": "^28.9.0",
|
||||||
"eslint-plugin-jsonc": "^2.18.2",
|
|
||||||
"eslint-plugin-prettier": "^5.2.1",
|
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"jose": "^5.9.6",
|
"jose": "^5.9.6",
|
||||||
"markdownlint-cli": "^0.43.0",
|
"markdownlint-cli": "^0.43.0",
|
||||||
"nock": "^13.5.6",
|
"nock": "^13.5.6",
|
||||||
"prettier": "^3.4.2",
|
"prettier": "^3.4.2",
|
||||||
"prettier-eslint": "^16.3.0",
|
|
||||||
"ts-jest": "^29.2.5",
|
"ts-jest": "^29.2.5",
|
||||||
"typescript": "^5.7.2"
|
"typescript": "^5.7.2",
|
||||||
|
"typescript-eslint": "^8.18.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user