-
Notifications
You must be signed in to change notification settings - Fork 5
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
style: add additional style rules & apply fixes #75
Commits on Apr 2, 2023
-
style: add
object-shorthand
rule & apply fixesThis rule ensures ```js const obj = { foo: 'bar', baz, } ``` Instead of allowing ```js const obj = { foo: 'bar', baz: baz, } ```
Configuration menu - View commit details
-
Copy full SHA for 1d098f9 - Browse repository at this point
Copy the full SHA 1d098f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 69201da - Browse repository at this point
Copy the full SHA 69201daView commit details -
style: add ts-eslint
key-spacing
rule & apply fixesThis rule ensures: ```js const foo = { bar: 'baz' }; ``` Instead of allowing: ```js const foo = { bar:'baz' }; ```
Configuration menu - View commit details
-
Copy full SHA for 9547350 - Browse repository at this point
Copy the full SHA 9547350View commit details -
style: add ts-eslint
space-before-blocks
ruleEnsures a space exists before the start of a block that is not on a new line. [Documentation](https://typescript-eslint.io/rules/space-before-blocks/) This rule ensures: ```js if (foo) { // } ``` Instead of allowing: ```js if (foo){ // } ```
Configuration menu - View commit details
-
Copy full SHA for 50ae0df - Browse repository at this point
Copy the full SHA 50ae0dfView commit details -
Ensures a space exists before and after the `=>` in an arrow function. [Documentation](https://eslint.org/docs/latest/rules/arrow-spacing) This rule ensures: ```js () => { // }; ``` Instead of allowing: ```js ()=>{ // }; ```
Configuration menu - View commit details
-
Copy full SHA for 510969d - Browse repository at this point
Copy the full SHA 510969dView commit details -
style: add
arrow-parens
rule & apply fixesEnsures parenthesis around arrow function parameters are only used when required. [Documentation](https://eslint.org/docs/latest/rules/arrow-parens) This rule ensures: ```js foo => { // }; (foo, bar) => { // }; ``` Instead of allowing: ```js (foo) => { // }; (foo, bar) => { // }; ```
Configuration menu - View commit details
-
Copy full SHA for 6e7ad52 - Browse repository at this point
Copy the full SHA 6e7ad52View commit details -
style: add ts-eslint
brace-style
ruleEnsures 1tbs (one true brace style), where braces must be on the same line as the keywords they're associated with. [Documentation](https://typescript-eslint.io/rules/brace-style/) This rule ensures: ```js if (foo) { // } else { // } try { // } catch(error) { // } ``` Instead of allowing: ```js if (foo) { // } else { // } try { // } catch(error) { // } ```
Configuration menu - View commit details
-
Copy full SHA for 4b009df - Browse repository at this point
Copy the full SHA 4b009dfView commit details -
style: add ts-eslint
member-delimiter-style
ruleEnsures semicolon delimiters between members of interface and type literals. [Documentation](https://typescript-eslint.io/rules/member-delimiter-style) This rule ensures: ```js interface Foo { name: string; greet(): string; } type Bar = { name: string } type FooBar = { name: string; greet(): string } ``` Instead of allowing: ```js interface Foo { name: string greet(): string } interface Foo { name: string, greet(): string, } interface Foo { name: string; greet(): string } type FooBar = { name: string, greet(): string } ```
Configuration menu - View commit details
-
Copy full SHA for fc0f03a - Browse repository at this point
Copy the full SHA fc0f03aView commit details -
style: add
array-bracket-newline
ruleEnsures array brackets are either both on new lines or are both on the same line. [Documentation](https://eslint.org/docs/latest/rules/array-bracket-newline) This rule ensures: ```js const foo = []; const foo = [ 1, 2, 3 ]; const foo = [ 1, 2, 3, ]; const foo = [{ bar: baz }]; const foo = [ { bar: baz } ]; ``` Instead of allowing: ```js const foo = [ ]; const foo = [ 1, 2, 3 ]; const foo = [ 1, 2, 3]; const foo = [{ bar: baz } ]; const foo = [ { bar: baz }]; ```
Configuration menu - View commit details
-
Copy full SHA for 50b4cef - Browse repository at this point
Copy the full SHA 50b4cefView commit details -
style: add
object-curly-newline
ruleEnsures object braces are either both on new lines or are both on the same line. [Documentation](https://eslint.org/docs/latest/rules/object-curly-newline) This rule ensures: ```js const foo = {}; const foo = { bar: baz }; const foo = { bar: baz, }; const { bar } = obj; const { bar } = obj; ``` Instead of allowing: ```js const foo = { }; const foo = { bar: baz }; const foo = { bar: baz}; const { bar } = obj; ```
Configuration menu - View commit details
-
Copy full SHA for d0a522e - Browse repository at this point
Copy the full SHA d0a522eView commit details -
style: add
padded-blocks
rule & apply fixesEnsures there is not a new line before or after the body of a block. [Documentation](https://eslint.org/docs/latest/rules/padded-blocks) This rule ensures: ```js if (foo) { // } ``` Instead of allowing: ```js if (foo) { // } if (foo) { // } if (foo) { // } ```
Configuration menu - View commit details
-
Copy full SHA for 304c42e - Browse repository at this point
Copy the full SHA 304c42eView commit details -
style: add
eslint-plugin-import/exports-last
rule & apply fixesEnsures all exports are declared at the bottom of the file. [Documentation](https://github.com/import-js/eslint-plugin-import/blob/5680a1f8d41cd19f9c60d999a6fadf10994a0a64/docs/rules/exports-last.md) This rule ensures: ```js const str = 'foo'; const bool = true; export { str, bool, }; ``` ```js const str = 'foo'; export const bool = true; ``` Instead of allowing: ```js export const bool = true; const str = 'foo'; ```
Configuration menu - View commit details
-
Copy full SHA for 02898f1 - Browse repository at this point
Copy the full SHA 02898f1View commit details -
style: add ts-eslint
indent
ruleEnsures consistent indentation. [Documentation](https://typescript-eslint.io/rules/indent) !! This has [known issues](typescript-eslint/typescript-eslint#1824), revert to ESLint's version if necessary. This rule ensures: ```js function foo() { if (bar) { console.log('baz'); } else { console.log('qux'); } } switch(a){ case "a": break; case "b": break; } ``` Instead of allowing: ```js function foo() { if (bar) { console.log('baz'); } else { console.log('qux'); } } switch(a){ case "a": break; case "b": break; } ```
Configuration menu - View commit details
-
Copy full SHA for 2406322 - Browse repository at this point
Copy the full SHA 2406322View commit details -
style: add
'no-unused-vars': 'off'
as per ts-eslint docsWe're already using `@typescript-eslint/no-unused-vars`, the [docs](https://typescript-eslint.io/rules/no-unused-vars) state to explicitly disable `no-unused-vars` to avoid conflicts.
Configuration menu - View commit details
-
Copy full SHA for 3154ea0 - Browse repository at this point
Copy the full SHA 3154ea0View commit details -
style: switch to ts-eslint's
semi
rule & apply fixesEnsures semicolons are added after each statement, including TypeScript statements. [Documentation](https://typescript-eslint.io/rules/semi) This rule ensures: ```js type ClientUser = Pick<User, 'id' | 'discord_user_id'>; const foo = 'bar'; object.foo = function() { // }; class Foo { bar = 1; } ``` Instead of allowing: ```js type ClientUser = Pick<User, 'id' | 'discord_user_id'> const foo = 'bar' object.foo = function() { // } class Foo { bar = 1 } ```
Configuration menu - View commit details
-
Copy full SHA for a20ad0c - Browse repository at this point
Copy the full SHA a20ad0cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6139fa9 - Browse repository at this point
Copy the full SHA 6139fa9View commit details -
style: add
padding-line-between-statements
rule for directivesEnsures there is an empty line after directives. [Documentation](https://eslint.org/docs/latest/rules/padding-line-between-statements) This rule ensures: ```js 'use strict'; const foo = 'bar'; ``` Instead of allowing: ```js 'use strict'; const foo = 'bar'; ```
Configuration menu - View commit details
-
Copy full SHA for c976eb7 - Browse repository at this point
Copy the full SHA c976eb7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c2f693 - Browse repository at this point
Copy the full SHA 3c2f693View commit details
Commits on Apr 4, 2023
-
style: add ts-eslint
keyword-spacing
ruleEnsures spacing around keywords such as `if`, `else`, `function`, `try`, `catch`, etc. [Documentation](https://typescript-eslint.io/rules/keyword-spacing) This rule ensures: ```js if (foo) { //... } else if (bar) { //... } else { //... } ``` Instead of allowing: ```js if (foo) { //... }else if (bar) { //... }else { //... } ```
Configuration menu - View commit details
-
Copy full SHA for 0d99d21 - Browse repository at this point
Copy the full SHA 0d99d21View commit details -
style: add ts-eslint
space-infix-ops
ruleEnsures spacing around operators such as `+`, `-`, `?`, `:`, `=`, etc. [Documentation](https://typescript-eslint.io/rules/space-infix-ops) This rule ensures: ```js a + b a + b a ? b : c // `object-curly-spacing` would ensure spacing inside `{}` var {a = 0} = bar; // `key-spacing` would ensure a space after `:` const a = {b:1}; function foo(a = 0) {} ``` Instead of allowing: ```js a+b a+ b a +b a?b:c var {a=0}=bar; const a={b:1}; function foo(a=0) { } ```
Configuration menu - View commit details
-
Copy full SHA for a7074f6 - Browse repository at this point
Copy the full SHA a7074f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f7f553 - Browse repository at this point
Copy the full SHA 5f7f553View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41949fc - Browse repository at this point
Copy the full SHA 41949fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0231dcd - Browse repository at this point
Copy the full SHA 0231dcdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7639c06 - Browse repository at this point
Copy the full SHA 7639c06View commit details -
Configuration menu - View commit details
-
Copy full SHA for c886081 - Browse repository at this point
Copy the full SHA c886081View commit details