Skip to content

Commit

Permalink
feat: support ESLint 7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Sep 19, 2020
1 parent a934cd7 commit 45949be
Show file tree
Hide file tree
Showing 5 changed files with 3,986 additions and 3,985 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -6,6 +6,7 @@ env:
matrix:
- ESLINT=5
- ESLINT=6
- ESLINT=7

node_js:
- 10.12
Expand All @@ -22,7 +23,7 @@ jobs:
- stage: release
if: branch = master AND type != pull_request AND fork = false
node_js: 14
env: ESLINT=6
env: ESLINT=7
script: npm run build
deploy:
provider: script
Expand Down
6 changes: 5 additions & 1 deletion lib/rules/no-debug.ts
Expand Up @@ -13,6 +13,10 @@ import {
} from '../node-utils';

export const RULE_NAME = 'no-debug';
export type MessageIds = 'noDebug';
type Options = [
{ renderFunctions?: string[]; }
];

function isRenderVariableDeclarator(
node: TSESTree.VariableDeclarator,
Expand Down Expand Up @@ -45,7 +49,7 @@ function hasTestingLibraryImportModule(
return LIBRARY_MODULES.some(module => module === literal.value);
}

export default ESLintUtils.RuleCreator(getDocsUrl)({
export default ESLintUtils.RuleCreator(getDocsUrl)<Options, MessageIds>({
name: RULE_NAME,
meta: {
type: 'problem',
Expand Down
5 changes: 4 additions & 1 deletion lib/rules/no-render-in-setup.ts
Expand Up @@ -12,6 +12,9 @@ import {

export const RULE_NAME = 'no-render-in-setup';
export type MessageIds = 'noRenderInSetup';
type Options = [
{ renderFunctions?: string[]; allowTestingFrameworkSetupHook?: string }
];

export function findClosestBeforeHook(
node: TSESTree.Node,
Expand All @@ -29,7 +32,7 @@ export function findClosestBeforeHook(
return findClosestBeforeHook(node.parent, testingFrameworkSetupHooksToFilter);
}

export default ESLintUtils.RuleCreator(getDocsUrl)({
export default ESLintUtils.RuleCreator(getDocsUrl)<Options, MessageIds>({
name: RULE_NAME,
meta: {
type: 'problem',
Expand Down

0 comments on commit 45949be

Please sign in to comment.