Matrix

Code style 

Cases we use 

camelCase = theFirstIsSmallTheRestIsCapital

kebab-case = meaning-only-lower-case-and-a-z-and-dash-and-numbers

PascalCase = JustAlphaAndAlwaysCapitalWords

CSS Prefix 

kebab-case

Prefix so that get away form namespace clashes.

.cory = corifeus

.cory-something { font-family: "Corifeus"; }

HTML Prefix 

kebab-case

Prefix so that get away form namespace clashes. It is both for tags and attributes.

cory = corifeus

<cory-element cory-attribute="kebab-case" class="cory-something"/>

Url 

kebab-case

https://localhost/very-long-sentance/is/just/kebab-case.html

Path 

kebab-case

/module-one/love/live/path.js

/try/code-style/by/class.js

Filename 

kebab-case

// function
camel-case.js

// class
camel-case-is-kebab-as-well.js

// html file
kebab-case.html

// regular file
kebab-case.any
kebab-case.js
kebab-case.pdf
kebab-case.html
kebab-case.css

Namespace 

camelCase

The namespace = corifeus

// JavaScript 
global.corifeus.camelCase = () => console.log('camelCase');
global.corifeus.camelCase = class camelCaseClass {};

Variables 

camelCase

// JavaScript 
const variableIsCool = 'camelCase';
let anotherVariable = false;
var oldTypeVariable = 'cool';

Functions 

camelCase

// JavaScript 
function justSimpleFunction() {
    console.log('alsoCamelCase')
}

Prototype based class 

I prefer camelCase , though PascalCase is fine.

// JavaScript
function prototypeBasedClass() {
    console.log('likeAClassIsCamelCase');
}

prototypeBasedClass.staticFunction = function() {}

prototypeBasedClass.staticVariable = true;

prototypeBasedClass.prototype.instanceFunction = function() {} 

prototypeBasedClass.prototype.instanceVariable = true; 

Classes 

I rarely use classes, but sometimes it is good, I prefer camelCase but for classes it is ok to use PascalCase.

camelCase

// JavaScript
class simpleClass {
    constructor() {}
    
    instanceFunctionCamelCase() {}
    
    get instanceProperty() { return true; }
    set instanceProperty(value) { this._instanceProperty = value; }
    
    static classMethod() { console.log('camelCase'); }
    static get classProperty() { return 'camelCase'; }
    
}

Objects 

camelCase

// JavaScript 
const objects = {
    variableNow: camelCase,
    methodName: camelCase,
    nameOfTheClass: camelCase,
    staticFuncitonName: camelCase.static,
    instance: camelCase.variable            
}
onenoteGithub onenoteredis-uiGithub redis-uiangular-compileGithub angular-compilegitlistGithub gitlistramdiskGithub ramdiskfreenomGithub freenomopenwrt-insomniaGithub openwrt-insomniaredis-ui-serverGithub redis-ui-serversystemd-managerGithub systemd-managerxml2jsonGithub xml2jsoncorifeusGithub corifeusredis-ui-materialGithub redis-ui-materialangular-http-cache-interceptorGithub angular-http-cache-interceptorhtml-pdfGithub html-pdfverdaccio-cliGithub verdaccio-clibinary-search-closestGithub binary-search-closestcorifeus-app-web-pagesGithub corifeus-app-web-pagescorifeus-builderGithub corifeus-buildercorifeus-utilsGithub corifeus-utilsgrunt-p3x-expressGithub grunt-p3x-expressjson2xls-worker-threadGithub json2xls-worker-threadtoolsGithub tools