{"id":20101346,"url":"https://github.com/beautiful-code/style-guide","last_synced_at":"2026-03-06T11:31:13.302Z","repository":{"id":66778515,"uuid":"208720213","full_name":"beautiful-code/style-guide","owner":"beautiful-code","description":null,"archived":false,"fork":false,"pushed_at":"2019-11-08T05:32:13.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-02T17:15:26.754Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beautiful-code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-16T05:53:07.000Z","updated_at":"2019-11-08T05:32:15.000Z","dependencies_parsed_at":"2023-02-23T04:15:34.538Z","dependency_job_id":null,"html_url":"https://github.com/beautiful-code/style-guide","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/beautiful-code/style-guide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beautiful-code%2Fstyle-guide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beautiful-code%2Fstyle-guide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beautiful-code%2Fstyle-guide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beautiful-code%2Fstyle-guide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beautiful-code","download_url":"https://codeload.github.com/beautiful-code/style-guide/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beautiful-code%2Fstyle-guide/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30173694,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T17:24:48.204Z","updated_at":"2026-03-06T11:31:13.263Z","avatar_url":"https://github.com/beautiful-code.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## Javascript Style Guide\n\n### Import Guidelines\n\nImports should be grouped as following with an empty line in between.\n\n- Third party imports with react and react-redux packages at the top.\n- UI related imports with 'common components', 'page components' and scss at the top\n- Other imports (ex: ****'reducers.js', 'actionCreators.js', 'helpers.js')\n\n-----\n\n### React Component Methods Order\n\nMethods in a react class component should be of the following order.\n\n1. static methods and properties\n2. lifecycle methods: `displayName`, `propTypes`, `contextTypes`, `childContextTypes`, `mixins`, `statics`, `defaultProps`, `constructor`, `getDefaultProps`, `state`, `getInitialState`, `getChildContext`, `getDerivedStateFromProps`, `componentWillMount`, `UNSAFE_componentWillMount`, `componentDidMount`, `componentWillReceiveProps`, `UNSAFE_componentWillReceiveProps`, `shouldComponentUpdate`, `componentWillUpdate`, `UNSAFE_componentWillUpdate`, `getSnapshotBeforeUpdate`, `componentDidUpdate`, `componentDidCatch`, `componentWillUnmount` (in this order).\n3. custom methods and event handlers\n4. `render` method\n\nEslint plugin: [react/sort-comp](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-comp.md).\n\n-----\n\n### Event handler functions naming convention\n\nFunctions name should start with `handle`. Followed by what the event does (noun). Should end with what type of event it is (verb)\n\nEx: `handleFormSubmit` , `handleModalOk`, `handleModalClose`, `handleModalCancel`, `handleDownloadClick`\n\n-----\n\n### Where should CSS go?\n\nCSS goes in three places- main-styles.scss, beside a Generic component and root scss file at each domain level\n\n-----\n\n### Redux action name convention\n\nTo avoid bugs caused by conflicts in redux action names, suffix with every action name it's domain name.\n\nEx: `OPEN_FILTER_DROPDOWN_IN_HOME` where `IN_HOME` is the suffix to identify the domain.\n\n-----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeautiful-code%2Fstyle-guide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeautiful-code%2Fstyle-guide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeautiful-code%2Fstyle-guide/lists"}