From dbf6c10a2ed9667b1fb3409d9cb1c7466865c366 Mon Sep 17 00:00:00 2001 From: Alasdair Mercer Date: Thu, 3 May 2018 11:03:34 +0100 Subject: [PATCH 1/7] updated keywords --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f2871ea..a46bb18 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "license": "MIT", "keywords": [ "eslint", - "config", + "eslintconfig", "notninja" ], "repository": { From 60d841679cf48d108cdca6f040cc799c76602380 Mon Sep 17 00:00:00 2001 From: Alasdair Mercer Date: Thu, 3 May 2018 11:05:12 +0100 Subject: [PATCH 2/7] updated copyright year --- LICENSE.md | 2 +- es5.js | 2 +- es6.js | 2 +- es7.js | 2 +- es8.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 6cc536a..989f1e4 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (C) 2017 Alasdair Mercer, !ninja +Copyright (C) 2018 Alasdair Mercer, !ninja Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/es5.js b/es5.js index f73456b..fde76b0 100644 --- a/es5.js +++ b/es5.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Alasdair Mercer, !ninja + * Copyright (C) 2018 Alasdair Mercer, !ninja * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/es6.js b/es6.js index 18c7c90..63d8249 100644 --- a/es6.js +++ b/es6.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Alasdair Mercer, !ninja + * Copyright (C) 2018 Alasdair Mercer, !ninja * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/es7.js b/es7.js index bbbc101..689b756 100644 --- a/es7.js +++ b/es7.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Alasdair Mercer, !ninja + * Copyright (C) 2018 Alasdair Mercer, !ninja * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/es8.js b/es8.js index f113040..9a4ec6b 100644 --- a/es8.js +++ b/es8.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Alasdair Mercer, !ninja + * Copyright (C) 2018 Alasdair Mercer, !ninja * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal From 08a09eaec1fecdbebc13c01e40ea6374797d4fd3 Mon Sep 17 00:00:00 2001 From: Alasdair Mercer Date: Thu, 3 May 2018 11:10:36 +0100 Subject: [PATCH 3/7] simplified how default version is managed --- README.md | 18 +++++++++--------- es.js | 27 +++++++++++++++++++++++++++ package.json | 2 +- 3 files changed, 37 insertions(+), 10 deletions(-) create mode 100644 es.js diff --git a/README.md b/README.md index a2ed9dd..834db47 100644 --- a/README.md +++ b/README.md @@ -33,15 +33,15 @@ Create an ESLint configuration file within your package that extends this config } ``` -This will extend the ECMAScript 5 configuration by default, but you can extend other ECMAScript versions by using the -following: - -| ECMAScript Version | Value | -| ------------------ | -------------------------------- | -| 5 | `"notninja"` or `"notninja/es5"` | -| 6 (2015) | `"notninja/es6"` | -| 7 (2016) | `"notninja/es7"` | -| 8 (2017) | `"notninja/es8"` | +This will extend the ECMAScript 5 configuration by default, but you can extend other ECMAScript versions as well. + +| ECMAScript Version | Value | +| ------------------ | ---------------- | +| Default (5) | `"notninja"` | +| 5 | `"notninja/es5"` | +| 6 (2015) | `"notninja/es6"` | +| 7 (2016) | `"notninja/es7"` | +| 8 (2017) | `"notninja/es8"` | ## Bugs diff --git a/es.js b/es.js new file mode 100644 index 0000000..d654c20 --- /dev/null +++ b/es.js @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2018 Alasdair Mercer, !ninja + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +'use strict'; + +module.exports = { + extends: './es5.js' +}; diff --git a/package.json b/package.json index a46bb18..1cea92a 100644 --- a/package.json +++ b/package.json @@ -21,5 +21,5 @@ "type": "git", "url": "https://github.com/NotNinja/eslint-config-notninja.git" }, - "main": "es5.js" + "main": "es.js" } From 9372d2751a04c2fab4cb515ba6b346837b5ddddc Mon Sep 17 00:00:00 2001 From: Alasdair Mercer Date: Thu, 3 May 2018 11:51:08 +0100 Subject: [PATCH 4/7] added ECMAScript 9 (2018) configuration --- README.md | 1 + es9.js | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 es9.js diff --git a/README.md b/README.md index 834db47..9f01b9a 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ This will extend the ECMAScript 5 configuration by default, but you can extend o | 6 (2015) | `"notninja/es6"` | | 7 (2016) | `"notninja/es7"` | | 8 (2017) | `"notninja/es8"` | +| 9 (2018) | `"notninja/es9"` | ## Bugs diff --git a/es9.js b/es9.js new file mode 100644 index 0000000..355b650 --- /dev/null +++ b/es9.js @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2018 Alasdair Mercer, !ninja + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +'use strict'; + +module.exports = { + extends: './es8.js', + parserOptions: { + ecmaVersion: 9 + } +}; From 3afe22fd3ed93f5e09072d5c71411ad91c0f1c8f Mon Sep 17 00:00:00 2001 From: Alasdair Mercer Date: Thu, 3 May 2018 12:02:06 +0100 Subject: [PATCH 5/7] added configurations for each ECMAScript version with sourceType as module --- README.md | 22 ++++++++++++---------- esm.js | 27 +++++++++++++++++++++++++++ esm5.js | 30 ++++++++++++++++++++++++++++++ esm6.js | 30 ++++++++++++++++++++++++++++++ esm7.js | 30 ++++++++++++++++++++++++++++++ esm8.js | 30 ++++++++++++++++++++++++++++++ esm9.js | 30 ++++++++++++++++++++++++++++++ 7 files changed, 189 insertions(+), 10 deletions(-) create mode 100644 esm.js create mode 100644 esm5.js create mode 100644 esm6.js create mode 100644 esm7.js create mode 100644 esm8.js create mode 100644 esm9.js diff --git a/README.md b/README.md index 9f01b9a..86b1f27 100644 --- a/README.md +++ b/README.md @@ -33,16 +33,18 @@ Create an ESLint configuration file within your package that extends this config } ``` -This will extend the ECMAScript 5 configuration by default, but you can extend other ECMAScript versions as well. - -| ECMAScript Version | Value | -| ------------------ | ---------------- | -| Default (5) | `"notninja"` | -| 5 | `"notninja/es5"` | -| 6 (2015) | `"notninja/es6"` | -| 7 (2016) | `"notninja/es7"` | -| 8 (2017) | `"notninja/es8"` | -| 9 (2018) | `"notninja/es9"` | +This will extend the ECMAScript 5 configuration by default, but you can extend other ECMAScript versions as well. You +also have the option of using either the script (i.e. normal) or ECMAScript modules (e.g `import foo from 'foo'`) source +type for any version, if desired. + +| ECMAScript Version | Script | ECMAScript Module | +| ------------------ | ---------------- | ----------------- | +| Default (5) | `"notninja"` | `"notninja/esm"` | +| 5 | `"notninja/es5"` | `"notninja/esm5"` | +| 6 (2015) | `"notninja/es6"` | `"notninja/esm6"` | +| 7 (2016) | `"notninja/es7"` | `"notninja/esm7"` | +| 8 (2017) | `"notninja/es8"` | `"notninja/esm8"` | +| 9 (2018) | `"notninja/es9"` | `"notninja/esm9"` | ## Bugs diff --git a/esm.js b/esm.js new file mode 100644 index 0000000..a3a8540 --- /dev/null +++ b/esm.js @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2018 Alasdair Mercer, !ninja + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +'use strict'; + +module.exports = { + extends: './esm5.js' +}; diff --git a/esm5.js b/esm5.js new file mode 100644 index 0000000..98b8fc9 --- /dev/null +++ b/esm5.js @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2018 Alasdair Mercer, !ninja + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +'use strict'; + +module.exports = { + extends: './es5.js', + parserOptions: { + sourceType: 'module' + } +}; diff --git a/esm6.js b/esm6.js new file mode 100644 index 0000000..eccb673 --- /dev/null +++ b/esm6.js @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2018 Alasdair Mercer, !ninja + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +'use strict'; + +module.exports = { + extends: './es6.js', + parserOptions: { + sourceType: 'module' + } +}; diff --git a/esm7.js b/esm7.js new file mode 100644 index 0000000..9ae3e55 --- /dev/null +++ b/esm7.js @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2018 Alasdair Mercer, !ninja + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +'use strict'; + +module.exports = { + extends: './es7.js', + parserOptions: { + sourceType: 'module' + } +}; diff --git a/esm8.js b/esm8.js new file mode 100644 index 0000000..316e44e --- /dev/null +++ b/esm8.js @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2018 Alasdair Mercer, !ninja + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +'use strict'; + +module.exports = { + extends: './es8.js', + parserOptions: { + sourceType: 'module' + } +}; diff --git a/esm9.js b/esm9.js new file mode 100644 index 0000000..1f16fbc --- /dev/null +++ b/esm9.js @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2018 Alasdair Mercer, !ninja + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +'use strict'; + +module.exports = { + extends: './es9.js', + parserOptions: { + sourceType: 'module' + } +}; From bb2cb30836d8a03dd60c44b853e3310e509f7cfc Mon Sep 17 00:00:00 2001 From: Alasdair Mercer Date: Thu, 3 May 2018 12:05:01 +0100 Subject: [PATCH 6/7] roll 0.2.4 --- CHANGES.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index be2f6ac..c88bb03 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,9 @@ +## Version 0.2.4, 2018.05.03 + +* Simplify how default configuration is managed +* Add configuration for ECMAScript 9 (2018) +* Add configurations for each ECMAScript version for ECMAScript modules + ## Version 0.2.3, 2017.07.20 * Disable `array-bracket-newline` rule diff --git a/package.json b/package.json index 1cea92a..c7bcf7e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-notninja", - "version": "0.2.3", + "version": "0.2.4", "description": "Standard ESLint configurations for !ninja packages", "homepage": "https://github.com/NotNinja/eslint-config-notninja", "bugs": { From e57593751d2a2ad0ed9d1c59269b4348138fdd45 Mon Sep 17 00:00:00 2001 From: Alasdair Mercer Date: Thu, 3 May 2018 12:05:28 +0100 Subject: [PATCH 7/7] re-roll 0.2.4 --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 0d665cb..edfd3c3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { "name": "eslint-config-notninja", - "version": "0.2.3", + "version": "0.2.4", "lockfileVersion": 1 }