Commit Graph

330 Commits

Author SHA1 Message Date
Max Desiatov 3d714964e6
Update README.md 2020-04-10 10:42:50 +01:00
Max Desiatov ed43729740
Update README.md 2020-04-10 10:41:56 +01:00
Max Desiatov 62f43d30fb
Add Binding property wrapper, remove unused code (#106) 2020-04-07 15:26:42 +01:00
Max Desiatov 7b119e8d0a
Create FUNDING.yml 2019-11-07 18:36:36 +00:00
Max Desiatov dff985471a
Update README.md 2019-06-16 18:06:10 +01:00
Max Desiatov 64aac7401d
Update README.md 2019-06-16 18:05:48 +01:00
Max Desiatov 273b92b858
Update README.md 2019-06-13 15:10:08 +01:00
Max Desiatov 3ebdb037a0
Update README.md 2019-06-13 15:07:29 +01:00
Max Desiatov 48c1a67571
Update README.md 2019-06-13 15:01:47 +01:00
matvii d0016c3141
Add TokamakLogger (#104)
* Init TokamakLogger

* Add TokamakLogger

* Apply swiftformat

* Fix var name

* Add TokamakLogger to project

* Add TokamakLoggerTest

* Remove unused code form TokamakLogger

* Remove logLevel proxying

* Add TokamakLoggerTest

* Add TokamakLoggerTest

* Add TokamakLogger to TokamakCLI

* Remove logLevel assignment

* Add TokamakCLI options bloc to Linter.md

* Remove force unwrap

* Add Logger

* Refactor TokamakLogHandler

* Apply swift format

* Fix error names

* Make error enum public
2019-06-04 16:52:58 +03:00
Max Desiatov 8cdb19802c
Fix typos in comments 2019-05-31 09:57:32 +01:00
matvii 770e1c4b44
Lint components type (#102)
* Extend HooksRule on extension

* Add ComponentAsStructRule

* Fix typo

* Apply swiftformat

* Fix violation description

* Fix rule name
2019-05-30 17:41:03 +03:00
matvii 30a2b9dda3
Extend HooksRule on extension (#101)
* Extend HooksRule on extension

* Simplify HooksRule

* Remove return type

* Add FIXME

* Apply swiftformat
2019-05-30 16:34:54 +03:00
matvii 295315e7b0
Fix one render function rule (#100)
* Fix getComponents and OneRenderFunctionRule

* Fix RenderGetsHooksRule

* Refactor GetComponents

* Refactor Rules

* Fix RenderGetsHooksRule

* Extend Node children search

* Add tests to RenderGetsHooksRule

* Apply swiftformat

* Fix comments
2019-05-29 11:56:11 +03:00
matvii 69c563337e
Lint Rules of Hooks (#98)
* Make Node Equatable

* Extend Node methods

* Init HooksRule

* Update HooksRule tests

* Update Node compare function

* Add start position to Node in TokenVisitor.visitPre

* Update HooksRule test

* Refactor HooksRule

* Fix typo in comments

* Rename functions in the tests

* Fix typo in comment

* Move repeated code in function

* Move repeated code in function

* Remove repeated code

* Apply swiftformat

* Group repeated guards
2019-05-23 17:36:13 +03:00
matvii 7c500d6b25
Refactor OneRenderFunction rule (#97)
* Regenerate project

* Revert "Regenerate project"

This reverts commit 37e676bf0a.

* Rename getRender to getOneRender

* Add component type check to getOneRender

* Add negative lint test

* Add OneRenderFunction description

* Add negative tests to RuleOfHooks

* Add test file with two correct components

* Refactor OneRenderFunctionRule

* Apply swiftformat

* Remove return from catch

* Replace map with compactMap

* Refactor throw violations in OneRenderFunctionRule

* Fix var name typo
2019-05-20 18:45:02 +03:00
matvii bd700035e6
Migrate from travis to azure (#96)
* Migrate from travis to azure

* Make scripts executable

* Add codecov token

* Add fail key to lint.sh

* Add fail flag to codecov.sh

* Add azure status to README.md
2019-05-18 21:56:28 +03:00
matvii 7d0b41ce4c
Move getRender to Node extension (#95)
* Make node final class

* Move getRender to Node extension

* Apply swiftformat

* Regenerate project
2019-05-18 16:12:54 +03:00
matvii 8377bf52eb
Add TokamakCLITests to Tokamak (#94)
* Add TokamakCLITests to Tokamak

* Add TEST_PATH to Tokamak scheme
2019-05-14 16:03:59 +03:00
matvii 5c65df1375
Add xcodebuild exit status to travis (#93)
* Add exit status

* Fix Color

* Update travis.yml script

* Remove unused extension

* Add condition for safe

* Add Color tests

* Add codecov.yml
2019-05-14 15:00:26 +03:00
matvii 4f02218fdb
Lint rules of hooks (#92)
* Remove broken test

* Add OneRenderFunctionRule

* Init RenderCorespondToNonPureComponentProtocolRule

* Fix OneRenderFunctionRule

* Apply swiftformat

* Fix RenderCorespondToNonPureComponentProtocolRule

* Add render check to RenderCorespondToNonPureComponentProtocolRule

* Update TokenVisitor

* Update getNodes

* Add TokenLint helpers

Add GetRender, IsConformance, TokenTypes

* Remove RenderCorespondToNonPureComponentProtocolRule

* Format comments

* Fix GetRender

* Remove TokenTypes

* Replace strings with SyntaxKind rawValue

* Add function to walk in graph

* Add TokenVisitor init function

* Add GraphWalkers to project

* Update isConformance function

* Update OneRenderFunctionRule

* Update getFirstChildOf function

* Update GraphWalkers

* Add getRender function

* Add RenderGetsHooksRule

* Update RenderGetsHooksRule

* Update RenderGetsHooksRule

* Apply swiftformat

* Rename getNodes to children

* Remove render from GetRender

* Remove IsConformance

* Mode nodes helpers to `Node.swift`

* Add test to Node

* Fix Unused Optional Binding Violation

* Fix Leading Whitespace Violation

* Apply swiftformat

* Fix typos

* Fix typos

* Remove unused code

* Clean code

* Move isInherited to Node

* Refactor hasTokamakImport

* Refactor Node

* Add helpers to TokamakCLITests

* Refactor code

* Update TokamakCLI main

* Refactor GetRender

* Fix typo

* Refactor rules

* Refactor TokenVIsitor

* Add TokamakCLI to .travis.yml

* Move NodeStruct to ValidationTests

* Add TEST_PATH to TokamakCLI

* Refactor StyleViolation

* Refactor Rule

* Add SwiftCLI to Package

* Apply swiftformat

* Regenerate project

* Update project.pbxproj

* Remove package for swift-4.2
2019-05-14 10:12:47 +03:00
Max Desiatov 78fa74d592
Rename TokamakCLI executable to plain tokamak (#90) 2019-05-06 11:28:41 +01:00
matvii ee1f2d93c8
Add SwiftCLI dependency to TokamakCLI (#89)
* Add public lintFile

* Add SwiftCLI package

* Add CLI to TokamakCLI

* Apply swiftformat

* Fix TokamakCLI version

* Fix typo

* Update TokamakCLI error catch

* Update TokamakCLI path

* Update Linter.md

* Remove SRCROOT

* Update Linter.md

* Update XcodeReporter

* Update project.pbxproj

* Remove commented print
2019-05-03 19:26:08 +03:00
Max Desiatov c3e7f5237e
Update Linter.md 2019-05-03 10:01:00 +01:00
Max Desiatov 4b607e1072
Reenable SwiftFormat in .travis.yml (#88) 2019-05-03 09:00:12 +01:00
matvii 4e2f4ab154
Make error output more readable (#87) 2019-05-02 14:00:15 +03:00
matvii 69afa7a917
Fix walkAndGrab (#86) 2019-05-02 12:37:18 +03:00
matvii 95239c7a20
Remove unused variables (#85) 2019-05-02 12:15:41 +03:00
matvii 1d1d159b55
Fix TokenVisitor handling of Range (#84)
* Fix TokenVisitor handling of Range

* Fix class name in TokamakLintTests

* Add testRange

* Fix algorithm to find the token range

* Add test to verify token range correctness

* Remove force unwrapping
2019-05-02 11:10:01 +03:00
matvii 3fa1253458
Fix TokamakLint types access scope (#83) 2019-05-01 14:28:36 +03:00
matvii cde8be4ab8
Add lintFolder function to TokamakCLI (#82)
* Add lintFolder

* Fix PropsIsEquatableRule
2019-04-29 16:21:20 +03:00
Max Desiatov 32c3739b90
Fix assert message in Components 2019-04-28 18:05:03 +01:00
matvii 6d0ac9b505
Refactor TokamakLint (#81)
* Add Protocols and Models to TokamakLint

* Refactor TokamakLint

* Fix PropsIsEquatable test

* Remove unready functional

* Update TokamakLint

* Remove  commented code

* Move unchanged method to protocol extension

* Remove internal

* Fix typo

* Remove unused property

* Format code

* Refactor PropsIsEquatableRule

* Remove lintFolder test from main.swift

* Remove unused variable

* Remove optional fields from Location

* Redactor RuleDescription and PropsIsEquatableRule

* Update Location.swift
2019-04-14 23:07:06 +03:00
Max Desiatov 7d0a1cc982
Temporarily disable SwiftFormat in .travis.yml 2019-04-11 11:16:30 +01:00
matvii 472dca3d36
Add TokamakLint module (#79)
* Init TokamakLint

* Fix Package.swift

* Move TokamakLint to Source

* Add SwiftSyntax to TokamakLint dependencies

* Rename TokamakLint to TokamaCLI

* Rename Lint.swift to main.swift

* Update TokamakCLI

* Init Lint Test

* Gererate project

* Update package.swift

* Clean and build

* Add Lint module

* Init test for one file

* Init file to test props

* Add test to check Props is Equatable

* Add lint warning

* Add warning to Props is not conformance from Equatable

* Init Linter doc & clean files

* Clean up code

* Format code

* Fix TokamakCLITest

* Fix Lint functions

* Remove IOU from TokenVisitor with optional

* Remove Encodable conformance from Node

* Remove unused file

* Rename test file

* Add comment of usage to `TestPropsEquatable`

* Remove unwanted methods

* Add scheme variable to TokamakCLI

* Update Linter.md

* Update TokamakCLI scheme

* Update Tokamak project

* Refactor TokamaLint

* Fix typo

* Add negative test to TokamakCLI

* Change output error function

* Simplify TokamakLint

* Fix TokamakLintTests

* Add error print to TokamakCLI

* Add error print to TokamakCLI

* Remove escapeHtmlSpecialCharacters

* Add print error to TokamakLint

* Add LintError

* Remove unused LintError case

* Expand LintError message

* Format LintError

* Format LintError
2019-04-08 17:07:55 +03:00
Max Desiatov 0467084141
Endorse Swift 5.0 usage in Requirements section 2019-04-03 09:44:27 +01:00
Max Desiatov b6c94827ef
Add build jobs/stages to .travis.yml (#80)
This will enable testing backward compatibility thanks to the build jobs for Xcode 10.0, 10.1 and 10.2.
2019-04-01 09:44:20 +01:00
Max Desiatov 36ec231b62
Fix formatting in README 2019-03-31 14:03:04 +01:00
Max Desiatov 5d32a512cc
Add TextView to StandardComponents.md 2019-03-30 10:53:59 +00:00
Max Desiatov 24e2a58861
Cleanup README text 2019-03-29 12:44:56 +00:00
Max Desiatov d43339ff7c
Reorder imports in example code in README 2019-03-29 12:43:14 +00:00
Alex Reilly 9f61b1536e Update counter example with correct imports (#78)
`AnyNode` doesn't exist if `Tokamak` isn't imported.
2019-03-29 12:41:09 +00:00
matvii 822d527a75
Add TextView host component (#76)
* Add TextView host component

* Refactor TextViewExample

* Add TextViewDelegate to TextView

* Add applyScrollOptions to TextView

* Apply swiftformat
2019-03-29 11:25:38 +02:00
matvii b2cd397b28
Add applyScrollOptions to UIScrollView components (#75)
* Add applyScrollOptions to UIScrollView components

* Add ScrollOptions to CollectionView, ListView, ScrollView

* Rename scrollProps to scrollOptions

* Change ScrollOptions init in Example

* Refactor ScrollView

* Remove storage ScrollOptions in ScrollView
2019-03-27 18:50:13 +02:00
matvii 895e50b4b2
Move TabPresenter to Presenters folder (#74) 2019-03-25 20:11:51 +02:00
matvii d26a41de38
Add TabPresenter host component (#66)
* Init TabBar

* Update TabExample

* Add ref to TabBar

* Add TabBarControllerBox

* Remove Router.swift

* Merge master in tab-bar

* Add TabBarControllerDelegate subclass

* Add hook to TabBarDelegate

* Fix SwiftLint warnings

* Fix TabBarController

* Fix TabBarExample

* Comment out counter example

* Remove Roter Presenters

* Remove addChild from AppKit

* Rename TabController to TabPresenter

* Add function to delete tab in TabBarExample

* Add `parent` parameter to unmount

* Add ability to delete TabItem in TabBarExample

* Add badge, badgeColor, image, selectedImage to TabItem

* Fix unmount functions

* Remove force cast

* Comment out counter example

* Move repeated style to constant

* Rename TokamakTabPresenter to TokamakTabController

* Add TabContent component

* Fix MountedHostComponent mount

* Fix TabBarExample

* Fix TabBarExample

* Fix TabBarExample strings

* Fix TabBarExample

* Fix TabItem

* Fix TabBarExample variable name
2019-03-25 18:55:31 +02:00
Max Desiatov c815e87f0c
Cleanup code example in README 2019-03-25 10:49:41 +00:00
Max Desiatov 5079669f55
Improve wording and table of contents in README 2019-03-25 10:08:48 +00:00
Max Desiatov 90315e0ecd
Add NetworkDemo example code and GIF to README 2019-03-25 10:06:15 +00:00
Max Desiatov 8bf37d34bd
Fix wording in README 2019-03-24 14:50:20 +00:00