Skip to content

Commit

Permalink
Switch run-rules-on-codebase script to ES Module (#1125)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker authored Feb 22, 2021
1 parent c2c28a6 commit 67df028
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"test": "xo && nyc ava",
"create-rule": "node ./scripts/create-rule.js",
"run-rules-on-codebase": "node ./test/run-rules-on-codebase/lint.js",
"run-rules-on-codebase": "node ./test/run-rules-on-codebase/lint.mjs",
"integration": "node ./test/integration/test.js",
"smoke": "eslint-remote-tester --config ./test/smoke/eslint-remote-tester.config.js"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env node
'use strict';
const {ESLint} = require('eslint');
const unicorn = require('../..');
import {ESLint} from 'eslint';
import unicorn from '../../index.js';

const {recommended} = unicorn.configs;
const files = [process.argv[2] || '.'];
Expand All @@ -10,6 +9,7 @@ const fix = process.argv.includes('--fix');
const eslint = new ESLint({
baseConfig: recommended,
useEslintrc: false,
extensions: ['.js', '.mjs'],
plugins: {
unicorn
},
Expand Down

0 comments on commit 67df028

Please sign in to comment.