@mobilabs/es6lib 2.3.0 → 3.0.0-beta.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ jobs:
12
12
  - uses: actions/checkout@v3
13
13
  - uses: actions/setup-node@v3
14
14
  with:
15
- node-version: 18
15
+ node-version: 22
16
16
  - run: npm install
17
17
  - run: npm run build:dev
18
18
  - run: npm test
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (https://www.mobilabs.fr)
3
+ Copyright (c) 2026 Mobilabs <contact@mobilabs.fr> (https://www.mobilabs.fr)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/_dist/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (https://www.mobilabs.fr)
3
+ Copyright (c) 2026 Mobilabs <contact@mobilabs.fr> (https://www.mobilabs.fr)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,9 +1,9 @@
1
1
  /*! ****************************************************************************
2
- * ES6lib v2.3.0
2
+ * ES6lib v3.0.0-beta.1.0
3
3
  *
4
4
  * A template for writing pure ES6 Javascript libraries.
5
5
  * (you can download it from npm or github repositories)
6
- * Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (http://www.mobilabs.fr/).
6
+ * Copyright (c) 2026 Mobilabs <contact@mobilabs.fr> (https://www.mobilabs.fr).
7
7
  * Released under the MIT license. You may obtain a copy of the License
8
8
  * at: http://www.opensource.org/licenses/mit-license.php).
9
9
  * Built from {{boiler:name}} v{{boiler:name:version}}.
@@ -313,14 +313,14 @@
313
313
  const obj = Object.create(methods);
314
314
  obj._library = {
315
315
  name: 'ES6lib',
316
- version: '2.3.0',
316
+ version: '3.0.0-beta.1.0',
317
317
  };
318
318
  return obj;
319
319
  };
320
320
 
321
321
  // Attaches constants to ES6lib that provide name and version of the lib.
322
322
  ES6lib.NAME = 'ES6lib';
323
- ES6lib.VERSION = '2.3.0';
323
+ ES6lib.VERSION = '3.0.0-beta.1.0';
324
324
 
325
325
 
326
326
  // -- Private Static Methods -----------------------------------------------
@@ -1,11 +1,11 @@
1
1
  /*! ****************************************************************************
2
- * ES6lib v2.3.0
2
+ * ES6lib v3.0.0-beta.1.0
3
3
  *
4
4
  * A template for writing pure ES6 Javascript libraries.
5
5
  * (you can download it from npm or github repositories)
6
- * Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (http://www.mobilabs.fr/).
6
+ * Copyright (c) 2026 Mobilabs <contact@mobilabs.fr> (https://www.mobilabs.fr).
7
7
  * Released under the MIT license. You may obtain a copy of the License
8
8
  * at: http://www.opensource.org/licenses/mit-license.php).
9
9
  * Built from {{boiler:name}} v{{boiler:name:version}}.
10
10
  * ************************************************************************** */
11
- !function(t,e){"use strict";"function"==typeof define&&define.amd?define([""],e):"object"==typeof exports?module.exports=e(t):t.ES6lib=e(t)}(this,(t=>{"use strict";let e,n;const i={Public:{}};return n=function(t,e){const n=Object.keys(e);for(let i=0;i<n.length;i++)t[n[i]]=e[n[i]]},function(){const t=i.Public;n(t,{getString:()=>"I am a string!",getArray:()=>[1,2,3]})}(),function(){const n=i.Public,r=t.ES6lib;let o;e=function(){const t=Object.create(o);return t._library={name:"ES6lib",version:"2.3.0"},t},e.NAME="ES6lib",e.VERSION="2.3.0",e._setTestMode=function(){return[]},e.noConflict=function(){return t.ES6lib=r,this},o={whoami(){return this._library},getString:()=>n.getString(),getArray:()=>n.getArray()}}(),e}));
11
+ !function(t,e){"use strict";"function"==typeof define&&define.amd?define([""],e):"object"==typeof exports?module.exports=e(t):t.ES6lib=e(t)}(this,t=>{"use strict";let e,n;const i={Public:{}};return n=function(t,e){const n=Object.keys(e);for(let i=0;i<n.length;i++)t[n[i]]=e[n[i]]},function(){const t=i.Public;n(t,{getString:()=>"I am a string!",getArray:()=>[1,2,3]})}(),function(){const n=i.Public,r=t.ES6lib;let o;e=function(){const t=Object.create(o);return t._library={name:"ES6lib",version:"3.0.0-beta.1.0"},t},e.NAME="ES6lib",e.VERSION="3.0.0-beta.1.0",e._setTestMode=function(){return[]},e.noConflict=function(){return t.ES6lib=r,this},o={whoami(){return this._library},getString:()=>n.getString(),getArray:()=>n.getArray()}}(),e});
@@ -1,11 +1,11 @@
1
1
  /*! ****************************************************************************
2
- * ES6lib v2.3.0
2
+ * ES6lib v3.0.0-beta.1.0
3
3
  *
4
4
  * A template for writing pure ES6 Javascript libraries.
5
5
  * (you can download it from npm or github repositories)
6
- * Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (http://www.mobilabs.fr/).
6
+ * Copyright (c) 2026 Mobilabs <contact@mobilabs.fr> (https://www.mobilabs.fr).
7
7
  * Released under the MIT license. You may obtain a copy of the License
8
8
  * at: http://www.opensource.org/licenses/mit-license.php).
9
9
  * Built from {{boiler:name}} v{{boiler:name:version}}.
10
10
  * ************************************************************************** */
11
- const $__ES6GLOB={};!function(t,e){"use strict";"function"==typeof define&&define.amd?define([""],e):"object"==typeof exports?module.exports=e(t):t.ES6lib=e(t)}($__ES6GLOB,(t=>{"use strict";let e,n;const i={Public:{}};return n=function(t,e){const n=Object.keys(e);for(let i=0;i<n.length;i++)t[n[i]]=e[n[i]]},function(){const t=i.Public;n(t,{getString:()=>"I am a string!",getArray:()=>[1,2,3]})}(),function(){const n=i.Public,r=t.ES6lib;let o;e=function(){const t=Object.create(o);return t._library={name:"ES6lib",version:"2.3.0"},t},e.NAME="ES6lib",e.VERSION="2.3.0",e._setTestMode=function(){return[]},e.noConflict=function(){return t.ES6lib=r,this},o={whoami(){return this._library},getString:()=>n.getString(),getArray:()=>n.getArray()}}(),e}));export default $__ES6GLOB.ES6lib;
11
+ const $__ES6GLOB={};!function(t,e){"use strict";"function"==typeof define&&define.amd?define([""],e):"object"==typeof exports?module.exports=e(t):t.ES6lib=e(t)}($__ES6GLOB,t=>{"use strict";let e,n;const i={Public:{}};return n=function(t,e){const n=Object.keys(e);for(let i=0;i<n.length;i++)t[n[i]]=e[n[i]]},function(){const t=i.Public;n(t,{getString:()=>"I am a string!",getArray:()=>[1,2,3]})}(),function(){const n=i.Public,r=t.ES6lib;let o;e=function(){const t=Object.create(o);return t._library={name:"ES6lib",version:"3.0.0-beta.1.0"},t},e.NAME="ES6lib",e.VERSION="3.0.0-beta.1.0",e._setTestMode=function(){return[]},e.noConflict=function(){return t.ES6lib=r,this},o={whoami(){return this._library},getString:()=>n.getString(),getArray:()=>n.getArray()}}(),e});export default $__ES6GLOB.ES6lib;
@@ -1,9 +1,9 @@
1
1
  /*! ****************************************************************************
2
- * ES6lib v2.3.0
2
+ * ES6lib v3.0.0-beta.1.0
3
3
  *
4
4
  * A template for writing pure ES6 Javascript libraries.
5
5
  * (you can download it from npm or github repositories)
6
- * Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (http://www.mobilabs.fr/).
6
+ * Copyright (c) 2026 Mobilabs <contact@mobilabs.fr> (https://www.mobilabs.fr).
7
7
  * Released under the MIT license. You may obtain a copy of the License
8
8
  * at: http://www.opensource.org/licenses/mit-license.php).
9
9
  * Built from {{boiler:name}} v{{boiler:name:version}}.
@@ -314,14 +314,14 @@ const $__ES6GLOB = {};
314
314
  const obj = Object.create(methods);
315
315
  obj._library = {
316
316
  name: 'ES6lib',
317
- version: '2.3.0',
317
+ version: '3.0.0-beta.1.0',
318
318
  };
319
319
  return obj;
320
320
  };
321
321
 
322
322
  // Attaches constants to ES6lib that provide name and version of the lib.
323
323
  ES6lib.NAME = 'ES6lib';
324
- ES6lib.VERSION = '2.3.0';
324
+ ES6lib.VERSION = '3.0.0-beta.1.0';
325
325
 
326
326
 
327
327
  // -- Private Static Methods -----------------------------------------------
package/bin/es6lib.js CHANGED
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * The MIT License (MIT)
6
6
  *
7
- * Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (http://www.mobilabs.fr)
7
+ * Copyright (c) 2026 Mobilabs <contact@mobilabs.fr> (http://www.mobilabs.fr)
8
8
  *
9
9
  * Permission is hereby granted, free of charge, to any person obtaining a copy
10
10
  * of this software and associated documentation files (the "Software"), to deal
@@ -24,29 +24,31 @@
24
24
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
25
  * THE SOFTWARE.
26
26
  * ************************************************************************** */
27
- /* eslint one-var: 0, semi-style: 0, no-underscore-dangle: 0 */
27
+ /* eslint one-var: 0, semi-style: 0, no-underscore-dangle: 0, curly: 0 */
28
28
 
29
- 'use strict';
30
29
 
31
30
  // -- Vendor Modules
32
- const fs = require('fs')
33
- , nopt = require('nopt')
34
- , path = require('path')
35
- , shell = require('shelljs')
36
- ;
31
+ import fs from 'fs';
32
+ import { fileURLToPath } from 'node:url';
33
+ import { dirname, join } from 'node:path';
34
+ import nopt from 'nopt';
35
+ import path from 'path';
36
+ import shell from 'shelljs';
37
37
 
38
38
 
39
39
  // -- Local Modules
40
+ import pack from '../package.json' with { type: 'json' };
40
41
 
41
42
 
42
43
  // -- Local Constants
43
44
  const defBoilerLib = 'ES6lib'
44
- /* eslint-disable-next-line object-curly-newline */
45
+ , __filename = fileURLToPath(import.meta.url)
46
+ , __dirname = dirname(__filename)
45
47
  , defAuthor = { name: 'John Doe', acronym: 'jdo', email: 'jdo@johndoe.com', url: 'http://www.johndoe.com' }
46
48
  , copyright = `Copyright (c) ${new Date().getFullYear()} {{author:name}} <{{author:email}}> ({{author:url}})`
47
49
  , baseapp = process.cwd()
48
50
  , baseboiler = __dirname.replace('/bin', '')
49
- , { version } = require('../package.json')
51
+ , { version } = pack
50
52
  , src = 'src'
51
53
  , test = 'test'
52
54
  , scripts = 'scripts'
@@ -282,7 +284,7 @@ function _addSkeleton(base, app, owner, cright) {
282
284
  * @returns {} -,
283
285
  */
284
286
  function _duplicate(source, dest) {
285
- const dupFiles = ['.eslintrc', 'rmdstore.sh'];
287
+ const dupFiles = ['eslint.config.js', 'rmdstore.sh'];
286
288
 
287
289
  for (let i = 0; i < dupFiles.length; i++) {
288
290
  process.stdout.write(` copied ${dupFiles[i]}\n`);
@@ -316,6 +318,7 @@ function _customize(source, dest, app, owner, boilerlib) {
316
318
  pack.unpkg = `_dist/lib/${app.toLowerCase()}.mjs`;
317
319
  pack.module = `_dist/lib/${app.toLowerCase()}.min.mjs`;
318
320
  pack.bin = {};
321
+ pack.type = 'module';
319
322
 
320
323
  pack.scripts = obj.scripts;
321
324
  pack.scripts['check:coverage'] = 'c8 check-coverage --statements 100 --branches 100 --functions 100 --lines 100';
package/index.js CHANGED
@@ -1,3 +1,2 @@
1
- 'use strict';
2
-
3
- module.exports = require('./lib/es6lib');
1
+ import ES6lib from './lib/es6lib.mjs';
2
+ export default ES6lib;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mobilabs/es6lib",
3
- "version": "2.3.0",
3
+ "version": "3.0.0-beta.1.0",
4
4
  "description": "A template for writing pure ES6 Javascript libraries",
5
5
  "main": "index.js",
6
6
  "minified": "_dist/lib/es6lib.min.js",
@@ -9,6 +9,7 @@
9
9
  "bin": {
10
10
  "es6lib": "./bin/es6lib.js"
11
11
  },
12
+ "type": "module",
12
13
  "scripts": {
13
14
  "general": " --- GENERAL ---",
14
15
 
@@ -55,7 +56,7 @@
55
56
  "url": "https://github.com/jclo/es6lib.git"
56
57
  },
57
58
  "keywords": [
58
- "es6",
59
+ "ES6",
59
60
  "umd",
60
61
  "library",
61
62
  "template",
@@ -66,7 +67,7 @@
66
67
  "author": {
67
68
  "name": "Mobilabs",
68
69
  "email": "contact@mobilabs.fr",
69
- "url": "http://www.mobilabs.fr/"
70
+ "url": "https://www.mobilabs.fr"
70
71
  },
71
72
  "license": "MIT",
72
73
  "bugs": {
@@ -74,26 +75,26 @@
74
75
  },
75
76
  "homepage": "https://github.com/jclo/es6lib",
76
77
  "dependencies": {
77
- "nopt": "^7.2.1",
78
- "shelljs": "^0.8.5"
78
+ "nopt": "^9.0.0",
79
+ "shelljs": "^0.10.0"
79
80
  },
80
81
  "devDependencies": {
81
- "c8": "^10.1.2",
82
- "chai": "^4.4.1",
83
- "cross-env": "^7.0.3",
84
- "eslint": "^8.57.0",
85
- "eslint-config-airbnb-base": "^15.0.0",
86
- "eslint-plugin-import": "^2.29.1",
82
+ "@eslint/js": "^9.39.4",
83
+ "c8": "^11.0.0",
84
+ "chai": "^6.2.2",
85
+ "cross-env": "^10.1.0",
86
+ "eslint": "^9.39.4",
87
+ "eslint-plugin-import": "^2.32.0",
87
88
  "http-server": "^14.1.1",
88
- "husky": "^9.1.1",
89
- "mocha": "^10.7.0",
90
- "nodemon": "^3.1.4",
91
- "terser": "^5.31.3"
89
+ "husky": "^9.1.7",
90
+ "mocha": "^11.7.5",
91
+ "nodemon": "^3.1.14",
92
+ "terser": "^5.47.1"
92
93
  },
93
94
  "c8": {
94
95
  "include": [
95
96
  "index.js",
96
- "lib/**/*.js"
97
+ "lib/**/*.mjs"
97
98
  ],
98
99
  "exclude": [],
99
100
  "all": false
@@ -22,21 +22,18 @@
22
22
  * @since 0.0.0
23
23
  * @version -
24
24
  * ************************************************************************** */
25
- /* eslint one-var: 0, semi-style: 0, no-underscore-dangle: 0,
25
+ /* eslint one-var: 0, semi-style: 0, no-underscore-dangle: 0, curly: 0,
26
26
  import/no-extraneous-dependencies: 0 */
27
27
 
28
- 'use strict';
29
28
 
30
29
  // -- Vendor Modules
31
- const fs = require('fs')
32
- , path = require('path')
33
- , nopt = require('nopt')
34
- ;
30
+ import fs from 'fs';
31
+ import path from 'path';
32
+ import nopt from 'nopt';
35
33
 
36
34
 
37
35
  // -- Local Modules
38
- const config = require('./config')
39
- ;
36
+ import config from './config.js';
40
37
 
41
38
 
42
39
  // -- Local Constants
@@ -26,20 +26,17 @@
26
26
  * @since 0.0.0
27
27
  * @version -
28
28
  * ************************************************************************** */
29
- /* eslint one-var: 0, semi-style: 0, no-underscore-dangle: 0 */
29
+ /* eslint one-var: 0, semi-style: 0, no-underscore-dangle: 0, curly: 0 */
30
30
 
31
- 'use strict';
32
31
 
33
32
  // -- Vendor Modules
34
- const fs = require('fs')
35
- , nopt = require('nopt')
36
- ;
33
+ import fs from 'fs';
34
+ import nopt from 'nopt';
37
35
 
38
36
 
39
37
  // -- Local Modules
40
- const pack = require('../package.json')
41
- , config = require('./config')
42
- ;
38
+ import pack from '../package.json' with { type: 'json' };
39
+ import config from './config.js';
43
40
 
44
41
 
45
42
  // -- Local Constants
@@ -27,21 +27,18 @@
27
27
  * @since 0.0.0
28
28
  * @version -
29
29
  * ************************************************************************** */
30
- /* eslint one-var: 0, semi-style: 0, no-underscore-dangle: 0,
30
+ /* eslint one-var: 0, semi-style: 0, no-underscore-dangle: 0, curly: 0,
31
31
  import/no-extraneous-dependencies: 0 */
32
32
 
33
- 'use strict';
34
33
 
35
34
  // -- Vendor Modules
36
- const fs = require('fs')
37
- , nopt = require('nopt')
38
- , { minify } = require('terser')
39
- ;
35
+ import fs from 'fs';
36
+ import nopt from 'nopt';
37
+ import { minify } from 'terser';
40
38
 
41
39
 
42
40
  // -- Local Modules
43
- const config = require('./config')
44
- ;
41
+ import config from './config.js';
45
42
 
46
43
 
47
44
  // -- Local Constants
@@ -23,21 +23,18 @@
23
23
  * @since 0.0.0
24
24
  * @version -
25
25
  * ************************************************************************** */
26
- /* eslint one-var: 0, semi-style: 0, no-underscore-dangle: 0,
26
+ /* eslint one-var: 0, semi-style: 0, no-underscore-dangle: 0, curly: 0,
27
27
  import/no-extraneous-dependencies: 0 */
28
28
 
29
- 'use strict';
30
29
 
31
30
  // -- Vendor Modules
32
- const fs = require('fs')
33
- , path = require('path')
34
- , nopt = require('nopt')
35
- ;
31
+ import fs from 'fs';
32
+ import path from 'path';
33
+ import nopt from 'nopt';
36
34
 
37
35
 
38
36
  // -- Local Modules
39
- const config = require('./config')
40
- ;
37
+ import config from './config.js';
41
38
 
42
39
 
43
40
  // -- Local Constants
package/scripts/config.js CHANGED
@@ -13,13 +13,12 @@
13
13
  * ********************************************************************** */
14
14
  /* eslint one-var: 0, semi-style: 0 */
15
15
 
16
- 'use strict';
17
16
 
18
17
  // -- Vendor Modules
19
18
 
20
19
 
21
20
  // -- Local Modules
22
- const pack = require('../package.json');
21
+ import pack from '../package.json' with { type: 'json'};
23
22
 
24
23
 
25
24
  // -- Local Constants
@@ -33,7 +32,7 @@ const libname = 'ES6lib'
33
32
 
34
33
  // -- Main
35
34
 
36
- module.exports = {
35
+ export default {
37
36
  ES6GLOB: '$__ES6GLOB',
38
37
  dist: './_dist',
39
38
  libdir: './lib',
@@ -27,18 +27,15 @@
27
27
  /* eslint one-var: 0, semi-style: 0, no-underscore-dangle: 0,
28
28
  import/no-extraneous-dependencies: 0 */
29
29
 
30
- 'use strict';
31
30
 
32
31
  // -- Vendor Modules
33
- const fs = require('fs')
34
- , path = require('path')
35
- , nopt = require('nopt')
36
- ;
32
+ import fs from 'fs';
33
+ import path from 'path';
34
+ import nopt from 'nopt';
37
35
 
38
36
 
39
37
  // -- Local Modules
40
- const config = require('./config')
41
- ;
38
+ import config from './config.js';
42
39
 
43
40
 
44
41
  // -- Local Constants
@@ -2,11 +2,9 @@
2
2
  /* global describe, it */
3
3
  /* eslint one-var: 0, semi-style: 0, no-underscore-dangle: 0 */
4
4
 
5
- 'use strict';
6
5
 
7
6
  // -- Vendor Modules
8
- const { expect } = require('chai')
9
- ;
7
+ import { expect } from 'chai';
10
8
 
11
9
 
12
10
  // -- Local Modules
@@ -23,7 +21,7 @@ const OWNPROPS = 2
23
21
 
24
22
 
25
23
  // -- Main
26
- module.exports = function(ES6lib, libname, version) {
24
+ export default function(ES6lib, libname, version) {
27
25
  describe('ES6lib introspection:', () => {
28
26
  describe('Test the nature of ES6lib:', () => {
29
27
  it('Expects ES6lib to be an object.', () => {
@@ -2,11 +2,9 @@
2
2
  /* global describe, it */
3
3
  /* eslint one-var: 0, semi-style: 0, no-underscore-dangle: 0 */
4
4
 
5
- 'use strict';
6
5
 
7
6
  // -- Vendor Modules
8
- const { expect } = require('chai')
9
- ;
7
+ import { expect } from 'chai';
10
8
 
11
9
 
12
10
  // -- Local Modules
@@ -27,7 +25,7 @@ const LIBPROPS = 0
27
25
 
28
26
 
29
27
  // -- Main
30
- module.exports = function(ES6lib, libname, version) {
28
+ export default function(ES6lib, libname, version) {
31
29
  describe('ES6lib introspection:', () => {
32
30
  describe('Test the nature of ES6lib:', () => {
33
31
  it('Expects ES6lib to be a function.', () => {
@@ -2,11 +2,9 @@
2
2
  /* global describe, it */
3
3
  /* eslint one-var: 0, semi-style: 0, no-underscore-dangle: 0 */
4
4
 
5
- 'use strict';
6
5
 
7
6
  // -- Vendor Modules
8
- const { expect } = require('chai')
9
- ;
7
+ import { expect } from 'chai';
10
8
 
11
9
 
12
10
  // -- Local Modules
@@ -27,7 +25,7 @@ const LIBPROPS = 0
27
25
 
28
26
 
29
27
  // -- Main
30
- module.exports = function(ES6lib, libname, version, type) {
28
+ export default function(ES6lib, libname, version, type) {
31
29
  describe('ES6lib introspection:', () => {
32
30
  describe('Test the nature of ES6lib:', () => {
33
31
  it('Expects ES6lib to be a function.', () => {
package/test/main.js CHANGED
@@ -2,16 +2,15 @@
2
2
  /* global describe */
3
3
  /* eslint one-var: 0, semi-style: 0 */
4
4
 
5
- 'use strict';
6
5
 
7
6
  // -- Vendor Modules
8
7
 
9
8
 
10
9
  // -- Local Modules
11
- const ES6lib = require('../index')
12
- , pack = require('../package.json')
13
- , testlib = require('./int/libprototypal')
14
- ;
10
+ import ES6lib from '../index.js';
11
+ // import ES6lib from '../lib/es6lib.mjs';
12
+ import pack from '../package.json' with { type: 'json' };
13
+ import testlib from './int/libprototypal.js';
15
14
 
16
15
 
17
16
  // -- Local Constants
package/.eslintrc DELETED
@@ -1,34 +0,0 @@
1
- {
2
- /**
3
- * Set JavaScript language options
4
- */
5
- "parserOptions": {
6
- "sourceType": "script"
7
- },
8
- /**
9
- * Set Environnement
10
- */
11
- "env": {
12
- "browser": true
13
- },
14
- /**
15
- * Set globals
16
- */
17
- "globals": {
18
- },
19
- /**
20
- * Set rules
21
- */
22
- "extends": "airbnb-base",
23
- // Overwritten airbnb's rules:
24
- "rules": {
25
- "strict": ["error", "global"],
26
- "func-names": ["error", "never"],
27
- "space-before-function-paren": ["error", { "anonymous": "never", "named": "never", "asyncArrow": "always" }],
28
- "no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
29
- "no-multi-spaces": [2, { "exceptions": { "VariableDeclarator": true } }],
30
- "comma-style": ["error", "first", { "exceptions": { "ArrayExpression": true, "ObjectExpression": true } }],
31
- "indent": ["error", 2, { "VariableDeclarator": { "const": 2 }, "SwitchCase": 1 }],
32
- "no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 0 }]
33
- }
34
- }