Skip to content

Commit

Permalink
Release v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DopustimVladimir committed Dec 14, 2021
1 parent d50f8d5 commit 9a57976
Show file tree
Hide file tree
Showing 13 changed files with 177 additions and 212 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.1.0 - First Release
## [1.0.0] - 2021-12-14

* Initial release
- Update configuration
- Update logic
- Update Jasmine tests

## [0.1.0] - First Release

- Initial release
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2018, DopustimVladimir <[email protected]>
Copyright (c) 2021, DopustimVladimir <[email protected]>

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

Expand Down
28 changes: 7 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,24 @@

Configuration file for CoffeeLint

[![NPM](https://img.shields.io/npm/dt/@dopustim/coffeelint-config.svg?style=flat-square)](https://www.npmjs.com/package/@dopustim/coffeelint-config)

[![GitHub tag](https://img.shields.io/github/tag/dopustim/coffeelint-config.svg?style=flat-square)](https://github.com/dopustim/coffeelint-config/tags)
[![GitHub stars](https://img.shields.io/github/stars/dopustim/coffeelint-config.svg?style=flat-square)](https://github.com/dopustim/coffeelint-config/stargazers)
[![GitHub issues](https://img.shields.io/github/issues/dopustim/coffeelint-config.svg?style=flat-square)](https://github.com/dopustim/coffeelint-config/issues)

[![License](https://img.shields.io/badge/license-ISC-green.svg?style=flat-square)](/LICENSE.md)
[![NPM](https://img.shields.io/npm/dt/@dopustim/coffeelint-config?style=flat-square)](https://www.npmjs.com/package/@dopustim/coffeelint-config)

## Features

- Provide Errors and Warnings
- 4 spaces for indentation (warning)
- 100 symbols per line (warning)
- 90 symbols per line (warning)
- Unix linebreaks (warning)

## Usage

Install `@dopustim/coffeelint-config` package via [NPM](https://www.npmjs.com/package/@dopustim/coffeelint-config):

```sh
$ npm i -D coffeelint @dopustim/coffeelint-config
npm install -D coffeelint @dopustim/coffeelint-config
```

Extend this config in your `coffeelint.json`:
Extend this config in your `.coffeelintrc.json`:

```json
{
Expand All @@ -47,18 +41,10 @@ You can also reassign any rule for your needs:
```json
{
"extends": "@dopustim/coffeelint-config",
"rules": {
"space_operators": {
"level": "ignore"
}
}
"max_line_length": { "value": 100, "limitComments": true, "level": "warn" }
}
```

## Rules

You can find all rules on [official site](http://www.coffeelint.org/#options).

## License
## About

[ISC License](./LICENSE.md) © 2018 Dopustim Vladimir
Visit the [CoffeeLint website](https://coffeelint.github.io) to find out all rules and descriptions.
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const possibleErrors = require("./rules/possible-errors.json")
const stylisticIssues = require("./rules/stylistic-issues.json")

module.exports = {
...possibleErrors,
...stylisticIssues
}
33 changes: 19 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
{
"name": "@dopustim/coffeelint-config",
"version": "0.1.0",
"version": "1.0.0",
"description": "Configuration file for CoffeeLint",
"keywords": [
"configuration",
"config",
"json",
"validate",
"lint",
"linter",
"coffeelint"
],
"keywords": [ "dopustim", "coffeelint", "config", "validate", "lint", "linter" ],
"author": "DopustimVladimir",
"license": "ISC",
"repository": "https://github.com/dopustim/coffeelint-config",
"main": "recommended.json",
"main": "index.js",
"scripts": {
"test": "jasmine spec/index-spec.js"
"test": "jasmine spec/*-spec.js"
},
"devDependencies": {
"coffeelint": "^2.1.0",
"jasmine": "^3.3.0"
"jasmine": "^3.10.0",
"@coffeelint/cli": "^5.2.1",
"eslint": "^8.4.1"
},
"eslintConfig": {
"extends": "@dopustim/eslint-config",
"env": {
"jasmine": true,
"es2020": true,
"node": true
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2020
}
}
}
135 changes: 0 additions & 135 deletions recommended.json

This file was deleted.

15 changes: 15 additions & 0 deletions rules/possible-errors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"coffeescript_error": { "level": "error" },
"cyclomatic_complexity": { "value": 10, "level": "warn" },
"duplicate_key": { "level": "error" },
"indentation": { "value": 4, "level": "warn" },
"line_endings": { "value": "unix", "level": "warn" },
"missing_fat_arrows": { "is_strict": false, "level": "ignore" },
"missing_parseint_radix": { "level": "warn" },
"no_backticks": { "level": "error" },
"no_debugger": { "console": false, "level": "error" },
"no_empty_functions": { "level": "ignore" },
"no_interpolation_in_single_quotes": { "level": "warn" },
"no_nested_string_interpolation": { "level": "error" },
"no_throwing_strings": { "level": "error" }
}
33 changes: 33 additions & 0 deletions rules/stylistic-issues.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"arrow_spacing": { "level": "warn" },
"braces_spacing": { "spaces": 1, "empty_object_spaces": 0, "level": "warn" },
"bracket_spacing": { "level": "ignore" },
"camel_case_classes": { "level": "warn" },
"colon_assignment_spacing": { "spacing": { "left": 0, "right": 1 }, "level": "warn" },
"empty_constructor_needs_parens": { "level": "ignore" },
"ensure_comprehensions": { "level": "warn" },
"eol_last": { "level": "warn" },
"max_line_length": { "value": 90, "limitComments": true, "level": "warn" },
"newlines_after_classes": { "value": 1, "level": "warn" },
"no_empty_param_list": { "level": "ignore" },
"no_implicit_braces": { "strict": false, "level": "ignore" },
"no_implicit_parens": { "strict": false, "level": "ignore" },
"no_plusplus": { "level": "ignore" },
"no_private_function_fat_arrows": { "level": "warn" },
"no_spaces": { "level": "ignore" },
"no_stand_alone_at": { "level": "ignore" },
"no_tabs": { "level": "warn" },
"no_this": { "level": "warn" },
"no_trailing_semicolons": { "level": "warn" },
"no_trailing_whitespace": { "allowed_in_comments": false, "allowed_in_empty_lines": true, "level": "warn" },
"no_unnecessary_double_quotes": { "level": "warn" },
"no_unnecessary_fat_arrows": { "level": "warn" },
"non_empty_constructor_needs_parens": { "level": "ignore" },
"object_shorthand": { "level": "ignore" },
"prefer_english_operator": { "doubleNotLevel": "ignore", "level": "warn" },
"prefer_fat_arrows_in_methods": { "level": "ignore" },
"prefer_logical_operator": { "level": "ignore" },
"space_operators": { "level": "warn" },
"spacing_after_comma": { "level": "warn" },
"transform_messes_up_line_numbers": { "level": "warn" }
}
9 changes: 9 additions & 0 deletions spec/fixtures/camel_case_classes/invalid.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

class duck
constructor: (name = 'Anonimous') ->
@name = name
quack: ->
@name + ' Duck: Quack-quack!'

donald = new duck 'Donald'
console.log donald.quack()
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

class duck
class Duck
constructor: (name='Anonimous') ->
@name = name
quack: ->
Expand Down
6 changes: 6 additions & 0 deletions spec/fixtures/space_operators/valid.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

class Duck
constructor: (name = 'Anonimous') ->
@name = name
quack: ->
@name + ' Duck: Quack-quack!'
Loading

0 comments on commit 9a57976

Please sign in to comment.