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/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/README.md b/README.md index a2ed9dd..86b1f27 100644 --- a/README.md +++ b/README.md @@ -33,15 +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 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. 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/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/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 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 + } +}; 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' + } +}; 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 } diff --git a/package.json b/package.json index f2871ea..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": { @@ -14,12 +14,12 @@ "license": "MIT", "keywords": [ "eslint", - "config", + "eslintconfig", "notninja" ], "repository": { "type": "git", "url": "https://github.com/NotNinja/eslint-config-notninja.git" }, - "main": "es5.js" + "main": "es.js" }