Skip to content

Commit

Permalink
[Release] v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ptkdev committed Jun 1, 2018
1 parent 368f082 commit 730b863
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
{
"indent": [
"error",
4
4,
{
"SwitchCase": 1
}
],
"linebreak-style": [
"error",
Expand All @@ -38,6 +41,6 @@
"no-constant-condition": [
"warn"
],
"snakecasejs/snakecasejs": "error"
"snakecasejs/snakecasejs": "warn"
}
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v1.0.1 (June 02, 2018)

* New: logo from [freepik](https://it.freepik.com/) (premium account)
* Exclude: executablePath()


# v1.0.0 (May 27, 2018)

* First Release.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ This is to enforce a style of snake_case in your project, rather than just disab
}
```
3. If work add star :star: at this project :heart:
4. If you want help me: <b><a href="http://paypal.ptkdev.io">donate on paypal</a> or become a <a href="http://patreon.ptkdev.io">backer on patreon</a></b>.
4. If you want help me: <b><a href="http://paypal.ptkdev.io"></b>donate on paypal</a> or become a <b><a href="http://patreon.ptkdev.io">backer on patreon</a></b>.

NOTE: switch `error` to `warn` if you don't need snake_case as mandatory rules.

Expand Down
14 changes: 13 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/**
* snakecasejs
* =====================
* This is to enforce a style of snake_case in your project, rather than just disabling camelcase.
*
* @author: Patryk Rzucidlo [@ptkdev] <[email protected]> (https://ptkdev.it)
* @original: David Buchan-Swanson <[email protected]>
* @license: This code and contributions have 'GNU General Public License v3'
* @version: 0.1
* @changelog: 0.1 initial release
*
*/
function is_class_usage(node) {
return ["FunctionDeclaration", "NewExpression", "MemberExpression"].indexOf(node.parent.type) > -1;
}
Expand All @@ -21,7 +33,7 @@ module.exports = {
return {
Identifier(node) {
var name = node.name;
var array_system_var = ["parseInt", "parseFloat", "isNaN", "isFinite", "decodeURI", "decodeURIComponent", "encodeURI", "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "indexOf", "forEach", "charAt", "charCodeAt", "endsWith", "lastIndexOf", "startsWith", "toLowerCase", "toLocaleLowerCase", "toUpperCase", "toLocaleUpperCase", "toFixed", "toPrecision", "setInterval", "clearInterval", "setTimeout", "toDateString", "toTimeString", "getTime", "getFullYear", "getUTCFullYear", "getMonth", "getUTCMonth", "getDate", "getUTCDate", "getDay", "getUTCDay", "getHours", "getUTCHours", "getMinutes", "getUTCMinutes", "getSeconds", "getUTCSeconds", "getMilliseconds", "getUTCMilliseconds", "getTimeZoneOffset", "setTime", "setMilliseconds", "setUTCMilliseconds", "setSeconds", "setUTCSeconds", "setMinutes", "setUTCMinutes", "setHours", "setUTCHours", "setDate", "setUTCDate", "setMonth", "setUTCMonth", "setFullYear", "setUTCFullYear", "toUTCString", "toISOString", "toJSON"];
var array_system_var = ["parseInt", "parseFloat", "isNaN", "isFinite", "decodeURI", "decodeURIComponent", "encodeURI", "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "indexOf", "forEach", "charAt", "charCodeAt", "endsWith", "lastIndexOf", "startsWith", "toLowerCase", "toLocaleLowerCase", "toUpperCase", "toLocaleUpperCase", "toFixed", "toPrecision", "setInterval", "clearInterval", "setTimeout", "toDateString", "toTimeString", "getTime", "getFullYear", "getUTCFullYear", "getMonth", "getUTCMonth", "getDate", "getUTCDate", "getDay", "getUTCDay", "getHours", "getUTCHours", "getMinutes", "getUTCMinutes", "getSeconds", "getUTCSeconds", "getMilliseconds", "getUTCMilliseconds", "getTimeZoneOffset", "setTime", "setMilliseconds", "setUTCMilliseconds", "setSeconds", "setUTCSeconds", "setMinutes", "setUTCMinutes", "setHours", "setUTCHours", "setDate", "setUTCDate", "setMonth", "setUTCMonth", "setFullYear", "setUTCFullYear", "toUTCString", "toISOString", "toJSON", "executablePath"];
var split = name.split(/(?=[A-Z])/);
var split_az = name.split(/(?=[a-z])/);
if ((split.length > 1 && split_az.length > 1) && !contains(array_system_var, name)) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-snakecasejs",
"version": "1.0.0",
"version": "1.0.1",
"main": "index.js",
"author": "Patryk Rzucidlo [@ptkdev] <[email protected]> (https://ptkdev.it)",
"author_original": "David Buchan-Swanson <[email protected]>",
Expand Down

0 comments on commit 730b863

Please sign in to comment.