summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-03-16 11:06:28 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-03-16 11:06:28 +0000
commit08dd9d48876194cb087014fb3ed46c8c86f7052f (patch)
tree498f8561585feab515aaaefc10f6ccfdd2ed95b4
parent4e7d4b4dc181dd47db41147291eb0c677fddd4c0 (diff)
parent95d38ac9f97e80a26aac8026a4d38a54fbdc98e8 (diff)
downloadgitlab-ce-08dd9d48876194cb087014fb3ed46c8c86f7052f.tar.gz
Merge branch 'remove-es6-extension-configuration' into 'master'
Remove remaining references to .es6 file extension in our config files and documentation See merge request !9980
-rw-r--r--.gitattributes1
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--config/karma.config.js2
-rw-r--r--config/webpack.config.js4
-rw-r--r--doc/development/testing.md4
-rw-r--r--lib/banzai/pipeline/gfm_pipeline.rb4
-rw-r--r--package.json7
-rw-r--r--spec/features/copy_as_gfm_spec.rb2
-rw-r--r--spec/javascripts/test_bundle.js4
9 files changed, 14 insertions, 16 deletions
diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index 70cce05d2b5..00000000000
--- a/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-*.js.es6 gitlab-language=javascript
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 35c36132169..ea273334d4c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -368,7 +368,7 @@ lint:javascript:report:
stage: post-test
before_script: []
script:
- - find app/ spec/ -name '*.js' -or -name '*.js.es6' -exec sed --in-place 's|/\* eslint-disable .*\*/||' {} \; # run report over all files
+ - find app/ spec/ -name '*.js' -exec sed --in-place 's|/\* eslint-disable .*\*/||' {} \; # run report over all files
- yarn run eslint-report || true # ignore exit code
artifacts:
name: eslint-report
diff --git a/config/karma.config.js b/config/karma.config.js
index a23e62f5022..c1d3751d88f 100644
--- a/config/karma.config.js
+++ b/config/karma.config.js
@@ -36,7 +36,7 @@ module.exports = function(config) {
{ pattern: 'spec/javascripts/fixtures/**/*@(.json|.html|.html.raw)', included: false },
],
preprocessors: {
- 'spec/javascripts/**/*.js?(.es6)': ['webpack', 'sourcemap'],
+ 'spec/javascripts/**/*.js': ['webpack', 'sourcemap'],
},
reporters: [progressReporter, 'coverage-istanbul'],
coverageIstanbulReporter: {
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 8e2b11a4145..cbcc9ac5aea 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -56,7 +56,7 @@ var config = {
module: {
rules: [
{
- test: /\.(js|es6)$/,
+ test: /\.js$/,
exclude: /(node_modules|vendor\/assets)/,
loader: 'babel-loader',
options: {
@@ -130,7 +130,7 @@ var config = {
],
resolve: {
- extensions: ['.js', '.es6', '.js.es6'],
+ extensions: ['.js'],
alias: {
'~': path.join(ROOT_PATH, 'app/assets/javascripts'),
'emojis': path.join(ROOT_PATH, 'fixtures/emojis'),
diff --git a/doc/development/testing.md b/doc/development/testing.md
index 9b545d7f0f1..5ac7b8dadeb 100644
--- a/doc/development/testing.md
+++ b/doc/development/testing.md
@@ -35,8 +35,8 @@ GitLab uses [Karma] to run its [Jasmine] JavaScript specs. They can be run on
the command line via `bundle exec karma`.
- JavaScript tests live in `spec/javascripts/`, matching the folder structure of
- `app/assets/javascripts/`: `app/assets/javascripts/behaviors/autosize.js.es6` has a corresponding
- `spec/javascripts/behaviors/autosize_spec.js.es6` file.
+ `app/assets/javascripts/`: `app/assets/javascripts/behaviors/autosize.js` has a corresponding
+ `spec/javascripts/behaviors/autosize_spec.js` file.
- Haml fixtures required for JavaScript tests live in
`spec/javascripts/fixtures`. They should contain the bare minimum amount of
markup necessary for the test.
diff --git a/lib/banzai/pipeline/gfm_pipeline.rb b/lib/banzai/pipeline/gfm_pipeline.rb
index b25d6f18d59..fd4a6a107c2 100644
--- a/lib/banzai/pipeline/gfm_pipeline.rb
+++ b/lib/banzai/pipeline/gfm_pipeline.rb
@@ -2,10 +2,10 @@ module Banzai
module Pipeline
class GfmPipeline < BasePipeline
# These filters convert GitLab Flavored Markdown (GFM) to HTML.
- # The handlers defined in app/assets/javascripts/copy_as_gfm.js.es6
+ # The handlers defined in app/assets/javascripts/copy_as_gfm.js
# consequently convert that same HTML to GFM to be copied to the clipboard.
# Every filter that generates HTML from GFM should have a handler in
- # app/assets/javascripts/copy_as_gfm.js.es6, in reverse order.
+ # app/assets/javascripts/copy_as_gfm.js, in reverse order.
# The GFM-to-HTML-to-GFM cycle is tested in spec/features/copy_as_gfm_spec.rb.
def self.filters
@filters ||= FilterArray[
diff --git a/package.json b/package.json
index 9652dd8f972..1048e29d0ac 100644
--- a/package.json
+++ b/package.json
@@ -2,9 +2,9 @@
"private": true,
"scripts": {
"dev-server": "webpack-dev-server --config config/webpack.config.js",
- "eslint": "eslint --max-warnings 0 --ext .js,.js.es6 .",
- "eslint-fix": "eslint --max-warnings 0 --ext .js,.js.es6 --fix .",
- "eslint-report": "eslint --max-warnings 0 --ext .js,.js.es6 --format html --output-file ./eslint-report.html .",
+ "eslint": "eslint --max-warnings 0 --ext .js .",
+ "eslint-fix": "eslint --max-warnings 0 --ext .js --fix .",
+ "eslint-report": "eslint --max-warnings 0 --ext .js --format html --output-file ./eslint-report.html .",
"karma": "karma start config/karma.config.js --single-run",
"karma-start": "karma start config/karma.config.js",
"webpack": "webpack --config config/webpack.config.js",
@@ -62,7 +62,6 @@
"exclude": [
"spec/javascripts/test_bundle.js",
"spec/javascripts/**/*_spec.js",
- "spec/javascripts/**/*_spec.js.es6",
"app/assets/javascripts/droplab/**/*"
]
}
diff --git a/spec/features/copy_as_gfm_spec.rb b/spec/features/copy_as_gfm_spec.rb
index ce34f48aaaf..55df7e45f79 100644
--- a/spec/features/copy_as_gfm_spec.rb
+++ b/spec/features/copy_as_gfm_spec.rb
@@ -20,7 +20,7 @@ describe 'Copy as GFM', feature: true, js: true do
end
# The filters referenced in lib/banzai/pipeline/gfm_pipeline.rb convert GitLab Flavored Markdown (GFM) to HTML.
- # The handlers defined in app/assets/javascripts/copy_as_gfm.js.es6 consequently convert that same HTML to GFM.
+ # The handlers defined in app/assets/javascripts/copy_as_gfm.js consequently convert that same HTML to GFM.
# To make sure these filters and handlers are properly aligned, this spec tests the GFM-to-HTML-to-GFM cycle
# by verifying (`html_to_gfm(gfm_to_html(gfm)) == gfm`) for a number of examples of GFM for every filter, using the `verify` helper.
diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js
index fae462561e9..c12b44cea89 100644
--- a/spec/javascripts/test_bundle.js
+++ b/spec/javascripts/test_bundle.js
@@ -48,10 +48,10 @@ describe('Uncovered files', function () {
'./network/branch_graph.js',
];
- const sourceFiles = require.context('~', true, /^\.\/(?!application\.js).*\.(js|es6)$/);
+ const sourceFiles = require.context('~', true, /^\.\/(?!application\.js).*\.js$/);
sourceFiles.keys().forEach(function (path) {
// ignore if there is a matching spec file
- if (testsContext.keys().indexOf(`${path.replace(/\.js(\.es6)?$/, '')}_spec`) > -1) {
+ if (testsContext.keys().indexOf(`${path.replace(/\.js$/, '')}_spec`) > -1) {
return;
}