Skip to content

Commit

Permalink
chore: update eslint-plugin-eslint-plugin to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Dec 6, 2021
1 parent b949df0 commit e1d8b41
Show file tree
Hide file tree
Showing 16 changed files with 126 additions and 12 deletions.
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.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
"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"
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

0 comments on commit e1d8b41

Please sign in to comment.