Skip to content

Commit

Permalink
[Fix] no-amd, no-commonjs: fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi authored and ljharb committed Aug 17, 2021
1 parent 7610790 commit ce8b203
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/src/rules/no-amd.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { RuleTester } from 'eslint';
import eslintPkg from 'eslint/package.json';
import semver from 'semver';

const ruleTester = new RuleTester();
const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 2015, sourceType: 'module' } });

ruleTester.run('no-amd', require('rules/no-amd'), {
valid: [
Expand Down
2 changes: 1 addition & 1 deletion tests/src/rules/no-commonjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import semver from 'semver';
const EXPORT_MESSAGE = 'Expected "export" or "export default"';
const IMPORT_MESSAGE = 'Expected "import" instead of "require()"';

const ruleTester = new RuleTester();
const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 2015, sourceType: 'module' } });

ruleTester.run('no-commonjs', require('rules/no-commonjs'), {
valid: [
Expand Down

0 comments on commit ce8b203

Please sign in to comment.