Skip to content

Commit

Permalink
Merge pull request #7 from ponbike/feature/add-babel
Browse files Browse the repository at this point in the history
Add babel parser
  • Loading branch information
pieter-pon authored Feb 28, 2022
2 parents efbdd71 + 8706e99 commit 1c793f2
Show file tree
Hide file tree
Showing 5 changed files with 5,564 additions and 2,187 deletions.
32 changes: 32 additions & 0 deletions babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const { resolve } = require('path')

module.exports = {
sourceType: 'module',
presets: [
[
'@babel/preset-env',
{
targets: {
node: true
}
}
]
],
plugins: [
'@babel/plugin-transform-modules-commonjs',
'@babel/syntax-import-assertions',
'babel-plugin-transform-import-meta',
[
'search-and-replace',
{
rules: [
{
searchTemplateStrings: true,
search: 'import.meta.url',
replace: resolve(__dirname, 'workers')
}
]
}
]
]
}
6 changes: 5 additions & 1 deletion eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"extends": "standard",
"extends": [
"standard",
"plugin:import/recommended"
],
"parser": "@babel/eslint-parser",
"rules": {
"block-scoped-var": "error",
"complexity": [
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import standardEngine from 'standard-engine'
import opts from './options.js'
import * as opts from './options.js'

const Linter = standardEngine.linter

Expand Down
Loading

0 comments on commit 1c793f2

Please sign in to comment.