Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update eslint-plugin-eslint-plugin to latest #230

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ jobs:
main:
strategy:
matrix:
node: [10.12, 10, 12.0, 12, 14, 15]
eslint: [7]
node: [12.22.0, 12, 14.17.0, 14, 16]
runs-on: ubuntu-latest
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.8.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
uses: styfle/cancel-workflow-action@0.9.1

- name: ⬇️ Checkout repo
uses: actions/checkout@v2
Expand All @@ -22,10 +21,13 @@ jobs:
with:
node-version: ${{ matrix.node }}

- name: 📥 Download deps
- name: 📥 Download dependencies
uses: bahmutov/npm-install@v1
with:
useLockFile: false

- name: 📥 Install ESLint v${{ matrix.eslint }}
run: npm install eslint@${{ matrix.eslint }}

- name: ▶️ Run test script
run: npm run test -- --runInBand
73 changes: 63 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@
"doctoc": "^2.0.0",
"eslint": "^7.23.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-eslint-plugin": "^3.0.0",
"eslint-plugin-eslint-plugin": "^4.0.2",
"eslint-plugin-jest": "^24.3.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"husky": "^6.0.0",
"jest": "^26.6.3",
"jest-runner-eslint": "^0.10.0",
"lint-staged": "^10.5.4",
"prettier": "^2.2.1"
"prettier": "2.2.1"
},
"peerDependencies": {
"eslint": "^7.0.0"
},
"engines": {
"node": "^10.12.0 || >=12.0.0"
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
"license": "ISC",
"lint-staged": {
Expand Down
1 change: 1 addition & 0 deletions rules/always-return.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ module.exports = {
docs: {
url: getDocsUrl('always-return'),
},
schema: [],
},
create(context) {
// funcInfoStack is a stack representing the stack of currently executing
Expand Down
1 change: 1 addition & 0 deletions rules/avoid-new.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = {
docs: {
url: getDocsUrl('avoid-new'),
},
schema: [],
},
create(context) {
return {
Expand Down
25 changes: 25 additions & 0 deletions rules/catch-or-return.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,31 @@ module.exports = {
messages: {
terminationMethod: 'Expected {{ terminationMethod }}() or return',
},
schema: [
{
type: 'object',
properties: {
allowFinally: {
type: 'boolean',
},
allowThen: {
type: 'boolean',
},
terminationMethod: {
oneOf: [
{ type: 'string' },
{
type: 'array',
items: {
type: 'string',
},
},
],
},
},
additionalProperties: false,
},
],
},
create(context) {
const options = context.options[0] || {}
Expand Down
14 changes: 14 additions & 0 deletions rules/no-callback-in-promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@ module.exports = {
messages: {
callback: 'Avoid calling back inside of a promise.',
},
schema: [
{
type: 'object',
properties: {
exceptions: {
type: 'array',
items: {
type: 'string',
},
},
},
additionalProperties: false,
},
],
},
create(context) {
return {
Expand Down
1 change: 1 addition & 0 deletions rules/no-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module.exports = {
messages: {
name: '"{{name}}" is not defined.',
},
schema: [],
},
create(context) {
/**
Expand Down
1 change: 1 addition & 0 deletions rules/no-nesting.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = {
docs: {
url: getDocsUrl('no-nesting'),
},
schema: [],
},
create(context) {
return {
Expand Down
1 change: 1 addition & 0 deletions rules/no-new-statics.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
url: getDocsUrl('no-new-statics'),
},
fixable: 'code',
schema: [],
},
create(context) {
return {
Expand Down
1 change: 1 addition & 0 deletions rules/no-promise-in-callback.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = {
docs: {
url: getDocsUrl('no-promise-in-callback'),
},
schema: [],
},
create(context) {
return {
Expand Down
1 change: 1 addition & 0 deletions rules/no-return-in-finally.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
docs: {
url: getDocsUrl('no-return-in-finally'),
},
schema: [],
},
create(context) {
return {
Expand Down
11 changes: 11 additions & 0 deletions rules/no-return-wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ module.exports = {
resolve: 'Avoid wrapping return values in Promise.resolve',
reject: 'Expected throw instead of Promise.reject',
},
schema: [
{
type: 'object',
properties: {
allowReject: {
type: 'boolean',
},
},
additionalProperties: false,
},
],
},
create(context) {
const options = context.options[0] || {}
Expand Down
1 change: 1 addition & 0 deletions rules/param-names.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = {
docs: {
url: getDocsUrl('param-names'),
},
schema: [],
},
create(context) {
return {
Expand Down
1 change: 1 addition & 0 deletions rules/prefer-await-to-callbacks.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = {
messages: {
error: 'Avoid callbacks. Prefer Async/Await.',
},
schema: [],
},
create(context) {
function checkLastParamsForCallback(node) {
Expand Down
1 change: 1 addition & 0 deletions rules/prefer-await-to-then.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = {
docs: {
url: getDocsUrl('prefer-await-to-then'),
},
schema: [],
},
create(context) {
/** Returns true if node is inside yield or await expression. */
Expand Down
1 change: 1 addition & 0 deletions rules/valid-params.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = {
'Ensures the proper number of arguments are passed to Promise functions',
url: getDocsUrl('valid-params'),
},
schema: [],
},
create(context) {
return {
Expand Down