xfiveco / generator-chisel

Chisel is a development framework for creating easy to maintain and fast WordPress websites.
https://www.getchisel.co
MIT License
269 stars 37 forks source link

Fix ESLint error on project creation #493

Closed luboskmetko closed 3 years ago

luboskmetko commented 3 years ago

Creating project with chisel create ends with the following error both for WP and static site project type:

Formatting code...
Error: Command failed with exit code 1: yarn --silent chisel-scripts lint
The following JS files have been auto-fixed:

  chisel.config.js

error: Unexpected use of file extension "js" for "./chisel.config.js" (import/extensions) at .eslintrc.js:2:30:
  1 | process.env.CHISEL_CONTEXT = __dirname;
> 2 | const chiselConfig = require('./chisel.config.js');
    |                              ^
  3 |
  4 | let extend = 'chisel';
  5 |

error: Unexpected use of file extension "js" for "./chisel.config.js" (import/extensions) at babel.config.js:1:30:
> 1 | const chiselConfig = require('./chisel.config.js');
    |                              ^
  2 |
  3 | module.exports = {
  4 |   presets: [

2 errors found.