Coding Style #389
-
As this is a new beginning, I was wondering if the style Generally speaking I don't think very highly of linters My SuggestionInstead of writing up guidelines that no one wants to read, Work by example, that is. StyleDon't enforce one strict style, simply ExampleColumnsSimply staying below 60 - 80 EditorconfigUse editorconfig for basic consistensy Writing small / clear if else return statementsstartIdForScope(scope){
return (scope === this.scopeName)
? -1
: null ;
},
startIdForScope(scope){
return (scope === this.scopeName)
? -1 : null ;
}, Give stuff spaceVertical space is cheap / easy to traverse~ const path = require('path');
const fs = require('fs-plus');
const { log } = console;
const hasWriteAccess = (directory) => {
const testPath = path
.join(directory,'write.test');
const date = new Date()
.toISOString();
try {
fs.writeFileSync(testPath,date,{ flag: 'w+' });
fs.unlinkSync(testPath);
} catch (error) { return false; }
return true;
}; GuideCreating a nice, simply & readable style guide Unlike https://github.com/atom/atom/blob/master/CONTRIBUTING.md for example |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
We already have a coding style, and it is Prettier. Run This is our prettier config used in all the packages (except for Atom itself). We don't want to change the prettier config used in Atom because that will create conflicts in the pull requests. |
Beta Was this translation helpful? Give feedback.
We already have a coding style, and it is Prettier. Run
script/lint --fix
.This is our prettier config used in all the packages (except for Atom itself). We don't want to change the prettier config used in Atom because that will create conflicts in the pull requests.
https://github.com/atom-community/prettier-config-atomic