Merge pull request #64 from actions/eslint-roller

Update ESLint config and expand usage
This commit is contained in:
James M. Greene
2022-09-26 14:12:25 -05:00
committed by GitHub
6 changed files with 15 additions and 22 deletions

View File

@@ -1,2 +0,0 @@
node_modules/
dist/

View File

@@ -1,19 +1,17 @@
{
"env": {
"commonjs": true,
"es6": true,
"jest": true,
"node": true
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
"es2021": true,
"node": true,
"jest": true
},
"plugins": ["github"],
"extends": ["eslint:recommended", "prettier", "plugin:github/internal"],
"parserOptions": {
"ecmaVersion": 2020
"ecmaVersion": 12
},
"rules": {
"semi": ["error", "never"]
}
},
"ignorePatterns": ["/dist/", "/pre/"]
}

View File

@@ -1,4 +1,4 @@
name: Checking linter
name: Check linter
on:
push:
@@ -31,4 +31,4 @@ jobs:
run: npm ci
- name: Verify linter
run: npm run lint
run: npm run lint:check

View File

@@ -23,12 +23,13 @@
"prettier": "^2.4.1"
},
"scripts": {
"lint": "eslint src",
"prepare": "ncc build src/index.js -o dist --source-map --license licenses.txt && ncc build src/pre.js -o pre --source-map --license licenses.txt",
"test": "jest",
"all": "npm run format && npm run lint && npm run prepare && npm run test",
"format": "prettier --write .",
"format:check": "prettier --check .",
"all": "npm run format && npm run lint && npm run prepare && npm run test"
"lint": "DEBUG=eslint:cli-engine eslint --fix .",
"lint:check": "DEBUG=eslint:cli-engine eslint .",
"prepare": "ncc build src/index.js -o dist --source-map --license licenses.txt && ncc build src/pre.js -o pre --source-map --license licenses.txt",
"test": "jest"
},
"repository": {
"type": "git",

View File

@@ -5,8 +5,6 @@ const path = require('path')
const nock = require('nock')
const axios = require('axios')
const { expect, jest } = require('@jest/globals')
const { Deployment } = require('./deployment')
describe('with all environment variables set', () => {

View File

@@ -2,8 +2,6 @@ const core = require('@actions/core')
const process = require('process')
const axios = require('axios')
const { expect, jest } = require('@jest/globals')
const { emitTelemetry } = require('./pre')
describe('emitTelemetry', () => {