diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-07-03 10:29:49 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-07-03 10:29:49 +0200 |
| commit | c17d2b306cf0a06db15983745c0d21e81890f8d0 (patch) | |
| tree | d03901a49c79011b24a06a823526ee8dda3a94c2 /.eslintrc.yml | |
| parent | 2fc8c95932e12bbf095c9424ae5c5d156d58c022 (diff) | |
| download | gohugo-theme-ed-c17d2b306cf0a06db15983745c0d21e81890f8d0.tar.gz | |
Use .eslintrc.yml instead of .eslintrc
Diffstat (limited to '.eslintrc.yml')
| -rw-r--r-- | .eslintrc.yml | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/.eslintrc.yml b/.eslintrc.yml new file mode 100644 index 0000000..96d004d --- /dev/null +++ b/.eslintrc.yml @@ -0,0 +1,110 @@ +--- +root: true + +extends: + - eslint:recommended + +env: + # ECMAScript 2017 globals + es2017: true + + # Browser global variables + browser: true + + # jQuery global variables + jquery: true + +parserOptions: + # ECMAScript 2017 + ecmaVersion: 8 + +rules: + # =============== + # Possible Errors + # =============== + # + # The following rules point out areas where you might have made + # mistakes. + + # disallow or enforce trailing commas + comma-dangle: [error, never] + + # disallow use of console. + no-console: warn + + # ============== + # Best Practices + # ============== + # + # These are rules designed to prevent you from making mistakes. + # They either prescribe a better way of doing something or help + # you avoid footguns. + + # require the use of === and !== + eqeqeq: [error, always] + + # disallow the use of alert, confirm, and prompt + no-alert: error + + # disallow use of eval() + no-eval: error + + # disallow use of multiple spaces + no-multi-spaces: error + + # =========== + # Strict Mode + # =========== + # + # These rules relate to using strict mode. + + # controls location of Use Strict Directives + strict: [error, global] + + # ================ + # Stylistic Issues + # ================ + # + # These rules are purely matters of style and are quite subjective. + + # this option sets a 2-space indentation for your code + indent: [warn, 2] + + # enforce one true brace style (1tbs) + brace-style: warn + + # require camel case names + camelcase: warn + + # enforce spacing before and after comma + comma-spacing: [warn, {before: false, after: true}] + + # enforce one true comma style + comma-style: [warn, last] + + # enforce newline at the end of file, with no multiple empty lines + eol-last: [warn, always] + + # specify whether double or single quotes should be used + quotes: [warn, single] + + # require or disallow use of semicolons instead of ASI + semi: [warn, always] + + # enforce spacing before and after semicolons + semi-spacing: [warn, {before: false, after: true}] + + # sort variables within the same declaration block + sort-vars: warn + + # ============ + # ECMAScript 6 + # ============ + # + # These rules are only relevant to ES6 environments. + + # require let or const instead of var + no-var: error + +# Report unused eslint-disable comments +reportUnusedDisableDirectives: true |
