-
Notifications
You must be signed in to change notification settings - Fork 9
Js formatting #565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Js formatting #565
Changes from all commits
a03cd5d
4d03162
047bf3a
b2574ca
6246ac0
8b17ea8
042a701
038e9ad
962429c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| root = true | ||
|
|
||
| [*] | ||
| indent_style = space | ||
| indent_size = 4 | ||
| end_of_line = lf | ||
| charset = utf-8 | ||
| trim_trailing_whitespace = true | ||
| insert_final_newline = true | ||
|
|
||
| [*.md] | ||
| trim_trailing_whitespace = false | ||
| insert_final_newline = false | ||
|
|
||
| [*.{yml,yaml}] | ||
| indent_size = 2 | ||
|
|
||
| [*.{ts,js,jsx,tsx}] | ||
| quote_type = double | ||
| continuation_indent_size = 2 | ||
| curly_brace_next_line = false | ||
| indent_brace_style = BSD | ||
| spaces_around_operators = true | ||
| spaces_around_brackets = true | ||
|
|
||
| [*.{pl,pm,t,PL}] | ||
| max_line_length = off | ||
| continuation_indent_size = 4 |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Deprecated |
This file was deleted.
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Deprecated |
This file was deleted.
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This mirrors most of the configuration from the |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import js from "@eslint/js"; | ||
| import globals from "globals"; | ||
| import tseslint from "typescript-eslint"; | ||
| import pluginReact from "eslint-plugin-react"; | ||
| import css from "@eslint/css"; | ||
| import { defineConfig } from "eslint/config"; | ||
| import stylistic from "@stylistic/eslint-plugin"; | ||
|
|
||
| export default defineConfig([ | ||
| { settings: { react: { version: "detect" } } }, | ||
| { ignores: ["*.cjs", "eslint.config.mjs", "**/public/**", "**/node_modules/**", "**/cypress/**", "cypress.config.ts", ".stylelintrc.js", "src/frontend/testing/**", "src/frontend/css/stylesheets/external/**", "src/frontend/components/dashboard/lib/react/polyfills/**", "babel.config.js", "webpack.config.js", "jest.config.js", "tsconfig.json", "src/frontend/js/lib/jqplot/**", "src/frontend/js/lib/jquery/**", "src/frontend/js/lib/plotly/**", "src/frontend/components/timeline/**", "fengari-web.js"] }, | ||
| { files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], plugins: { js }, extends: ["js/recommended"] }, | ||
| { files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], languageOptions: { globals: { ...globals.browser, ...globals.jquery } } }, | ||
| tseslint.configs.recommended, | ||
| pluginReact.configs.flat.recommended, | ||
| { files: ["**/*.css"], plugins: { css }, language: "css/css", extends: ["css/recommended"] }, | ||
| { plugins: {'@stylistic': stylistic} }, | ||
| { | ||
| rules: { | ||
| "@typescript-eslint/no-explicit-any": "off", | ||
| 'react/prop-types': 'off', | ||
| 'react/no-deprecated': 'off', // We are currently using deprecated React features, so we disable this rule - this will change in the future | ||
| '@stylistic/quotes': ['error', 'single'], | ||
| '@stylistic/no-extra-semi': 'error', | ||
| '@stylistic/semi': ['error', 'always'], | ||
| '@stylistic/curly-newline': 'error', | ||
| '@stylistic/newline-per-chained-call': 'error', | ||
| '@stylistic/indent': ['error', 4], | ||
| '@stylistic/comma-dangle': ['error', 'never'] | ||
| } | ||
| } | ||
| ]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To manage formatting on files