Skip to content

Commit

Permalink
feat: set source type as module for recommended
Browse files Browse the repository at this point in the history
  • Loading branch information
barmac authored and fake-join[bot] committed Sep 15, 2022
1 parent d1ba930 commit adbe232
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ All notable changes to [eslint-plugin-bpmn-io](https://github.com/bpmn-io/eslint

___Note:__ Yet to be released changes appear here._

## 0.16.0

* `FEAT`: set source type as module for `recommended`

## 0.15.1

* `FIX`: use `env#node` in `mocha` config
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ We ship with a few blue prints:
* `bpmn-io/jsx`: Use `jsx` in conjunction with `browser`
* `bpmn-io/node`: Use for node based projects
* `bpmn-io/mocha`: Use for libraries tested with `mocha` + `chai`
* `bpmn-io/recommended`: Use for libraries where no environment is assumed


## License
Expand Down
3 changes: 0 additions & 3 deletions configs/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ module.exports = {
env: {
browser: true
},
parserOptions: {
sourceType: 'module'
},
extends: [
'plugin:bpmn-io/recommended'
]
Expand Down
3 changes: 2 additions & 1 deletion configs/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ module.exports = {
es2018: true
},
parserOptions: {
ecmaVersion: 2018
ecmaVersion: 2018,
sourceType: 'module'
},
extends: [
'eslint:recommended'
Expand Down
3 changes: 3 additions & 0 deletions test/node/cls.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { nodeImportedFn } from './node-imports';

const { Bar } = require('./bar');

nodeImportedFn();

module.exports = class Foo extends Bar {

Expand Down
8 changes: 8 additions & 0 deletions test/recommended/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": [
"plugin:bpmn-io/recommended"
],
"globals": {
"Blub": false
}
}
53 changes: 53 additions & 0 deletions test/recommended/cls.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { Bar } from './bar';


export class Foo extends Bar {

constructor(a, b, { c }) {
super(a, c);
}

foo(d) {

const [ _, blub ] = Blub.blub(...d);

const foop = "Hello 'BLUB'";

return {
...this.bar,
blub,
foop,
d
};
}

async other(a) {
await this.b();
}

longArgFn(
hello, world,
wowo, wooooooooorld) {

const a = {};

const {
c,
d,
...rest
} = a;

return rest;
}

async asyncIterator() {
const stream = [];

for await (const chunk of stream) {
test(chunk);
}
}

}

function test() {}

0 comments on commit adbe232

Please sign in to comment.